Bhanu Priya has Published 1449 Articles

What are the high level I/O functions in C language?

Bhanu Priya

Bhanu Priya

Updated on 11-Mar-2021 07:03:50

5K+ Views

I/O refers to the input - output functions in C language.High level I/OThese are easily understood by human beingsThe advantage is portability.Low level I/OThese are easily understood by computer.The advantage is that execution time is less.The disadvantage is that Non portability.High level I/O FunctionsThe high level input - output (I/O) ... Read More

Write a C program to work on statements using functions and loops

Bhanu Priya

Bhanu Priya

Updated on 10-Mar-2021 09:36:53

165 Views

ProblemHow to print the long lines into two or more short lines based on specified length in the program using C Language?SolutionLet’s write a code to read a long line and print into two or more short lines according to the mentioned size in the program.The built in functions that ... Read More

Why files are needed in C programming language?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 10:04:35

4K+ Views

Files is collection of records (or) it is a place on hard disk, where data is stored permanently. By using C commands, we access the files in different ways.Need of files in C languageEntire data is lost when the program terminates and storing in a file will preserve your data ... Read More

Explain the Union to pointer in C language

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 09:57:33

1K+ Views

A union is called as a memory location, which is shared by several variables of different data types.SyntaxThe syntax is as follows −union uniontag{    datatype member 1;    datatype member 2;    ----    ----    datatype member n; };For example, union sample{    int a;    float b; ... Read More

Explain the concept of union of structures in C language

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 09:54:13

679 Views

If the structure is nested inside a union, it is called as a union of structures. There is a possibility to create a union inside a structure in C programming language.ExampleFollowing is the C program for union of structures −#include struct x {    int a;    float b; }; ... Read More

Write a structure in local scope program using C language

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 09:53:13

425 Views

Structure is a collection of different datatype variables, grouped together under a single name.Features of structureThe features of structure are explained below −It is possible to copy the contents of all structure elements of different datatypes to another structure variable of its type by using an assignment operator.For handling complex ... Read More

State the difference between structure and union with suitable example in C language

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 09:51:16

2K+ Views

The differences between structures and unions in C language are explained below −S.NoStructureUnion1DefinitionStructure is heterogenous collection of data items grouped together under a single nameDefinitionA union is a memory location that is shared by several variables of different datatypes.2Syntax;struct tagname{    datatype member1;    datatype member2;    ----    ---- ... Read More

Explain the concept of Uninitialized array accessing in C language

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 09:48:46

1K+ Views

ProblemIn C language, is the program executed, if we use an uninitialized array?SolutionIf we use any uninitialized array, compiler will not generate any compilation and an execution error.If an array is uninitialized, you may get unpredictable result.So, it’s better we should always initialize the array elements with default values.Example ProgramFollowing ... Read More

What is out of bounds index in an array - C language?

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 09:46:45

3K+ Views

Suppose you have an array with four elements. Then, an array indexing will be from 0 to 3, i.e., we can access elements from index 0 to 3.But, if we use index which is greater than 3, it will be called as an index out of bounds.If, we use an ... Read More

Give the clarity on Pointer structures with suitable example in C language

Bhanu Priya

Bhanu Priya

Updated on 09-Mar-2021 09:45:25

175 Views

Pointer to structure holds the address of an entire structure.Mainly, these are used to create the complex data structures such as linked lists, trees, graphs and so on.The members of the structure can be accessed by using a special operator called arrow operator ( -> ).DeclarationFollowing is the declaration for ... Read More

Advertisements