C Viva Questions
C Viva Questions
2. What is a compiler?
Ans- Compile is a software program that transfer program developed in a
high-level language into executable object code.
3. What is an algorithm?
Ans- The approach or method that is used to solve the problem is called an
algorithm.
6. What is an identifier?
Ans- Identifiers are user-defined names given to variables, functions and arrays.
7. What are the Back Slash character constants or Escape sequence characters
available in C?
Ans- Back Slash character constant are \t, \n, \0.
8. What is a variable?
Ans- Variables are user-defined names given to memory locations and are used to
store values.A variable may have different values at different times during program
execution.
25. What is the difference between normal variable and array variable?
Ans- A variable can store only one value at a time whereas an array variable can
store severalvalue at a time.
Ans- C functions are divided into two categories user-defined function and built-in
functions
Ans- A pointer variable is a variable that can store the address of another variable
Ans- By using the address of the operator we can store the address of a variable in
a pointer
Ans- A pointer variable irrespective of its type it occupies two bytes in memory
Ans- The structure is user-defined data typed. The structure is a collective name
given to dissimilar elements
Ans- Structures store dissimilar values whereas arrays stores similar values. One
structure variable can be assigned to another structure variable whereas one array
variable cannot be assigned to another array variable
40. What is the size of a structure?
Ans- Union is a user-defined data type that can store a value of different data types
Ans- fopen, fclose, fgetc, fputc, fgets, fputs, fprintf, fscanf, fread, fwrite, fseek
Ans- We can use structure members using arrow operator with its pointer
46. What is the difference between normal variable and array variable?
Ans- A variable can store only one value at a time whereas an array variable can
store several values at a time.