Top

C Programming

91.

When to user -> (arrow) operator.

Ans:

If the structure/union variable is a pointer variable, to access structure/union elements the arrow operator is used.

92.

How many operators are there under the category of ternary operators?

Ans:

There is only one operator and is a conditional operator (? : ).

93.

Which keyword is used to perform unconditional branching?

Ans:

goto

94.

What are bit fields?

Ans:

We can create integer structure members of differing sizes apart from non-standard sizes using bit fields. Such structure size is automatically adjusted with the multiple integer size of the machine.

95.

Mention File operations in C Language.

Ans:

Basic File Handling Techniques in C, provide the basic functionalities that users can perform against files in the system.

Function Operation
fopen() To Open a File
fclose() To Close a File
fgets() To Read a File
fprint() To Write into a File

96.

Describe the file opening mode “w+”.

Ans:

Opens a file both for reading and writing. If a file is not existing it creates one, else if the file is existing it will be over written.

97.

Is FILE a built-in data type?

Ans:

No, it is a structure defined in stdio.h

98.

Which built-in function can be used to move the file pointer internally?

Ans:

fseek()

99.

Name a function which can be used to close the file stream.

Ans:

fclose().

100.

What are different storage class specifiers in C?

Ans:

auto, register, static, extern

Loading…
Tags: C Programming Interview Questions and Answers || C Programming Sort Questions and Answers || C Programming Detailed Questions and Answers || C Programming Tutorial