C Programming Viva Questions
C Programming Viva Questions
1. What is C language?
C is a general-purpose, structured programming language developed by Dennis Ritchie. It is widely used for
The basic data types in C are int, float, char, and double.
4. What is a pointer?
printf() is used to display output, and scanf() is used to take input from the user.
6. What is a loop?
A loop is used to repeat a block of code. Examples are for, while, and do-while loops.
7. What is an array?
In while loop, the condition is checked before the loop runs. In do-while, the loop runs at least once before
9. What is recursion?
10. What is the difference between call by value and call by reference?
Call by value passes a copy of the variable; call by reference passes the address, allowing changes to
original value.
Header files contain predefined functions and macros. Example: stdio.h, conio.h.
getch() is used to hold the output screen until a key is pressed (mainly in Turbo C).
A structure is a user-defined data type that allows grouping variables of different types.
An array stores similar data types, while a structure can store different data types.