C Programming Viva Questions Answers

If you are preparing for a C programming viva or interview, then you have reached the right place. In this article, a list of frequently asked C programming viva or interview questions and answers are given below. You will also get a mix of Basic to Advanced C programming viva or interview questions in this article. And before going ahead, if you want to know more about C programming, check out Introduction to C now?

C Programming Viva Questions Answer Download (PDF)

C Programming Viva Questions Answers Part-2
Case sensitivity means upper case and lower case letters are treated differently in C language.
Debugging is the process of identifying errors within a program.
Syntax errors occur at the time of compilation. It comes when rules of programming language are not followed properly.
Logical errors occur at the time of execution. It comes when logics are not properly implemented in the program.
Void is a data type. We can use any data type before main(). The data types are used to denote return type of main() function. If we are using void then it gives instruction to compiler that main() function will not return any value.
The function main() can appear only once. The program execution starts from main() function.
Curly brackets{} are mainly used to group several lines of code. It will still work without error if you used it for a single line. Some programmers prefer this method as a way of organizing code to make it look clear, especially in conditional statement.
Yes, it can be but cannot be executed, as the execution require main() function definition.
It is used to clear console or screen. It is declared in conio.h file. It is predefined function.
Comments are a great way to put some remarks or description in a program. It can serve as a reminder on what the program is all about. Comments begin with /* and ended by */ characters. It can be single line, or can even several lines. It can be placed anywhere in the program.
Syntax means predefined rules of any programming language.
C program contains documentation section, link section, definition section, global declaration section, main function and other user defined functions.
Format specifiers are used to specify type of value which we are going to read through scanf() function and to print through printf() function. Some format specifiers are: int – %d, flaot – %f, char – %c.
Garbage value means unused value. When we declare a variable compiler automatically provides some value which is useless for programmer so this value is known as garbage value.
The getch() function reads a single character from the keyboard. It doesn’t use any buffer, so entered data will not be displayed on the output screen.
The getche() function reads a single character from the keyword, but data is displayed on the output screen. Press Alt+f5 to see the entered character.
C is called a mid-level programming language because it binds the low level and high -level programming language. We can use C language as a System programming to develop the operating system as well as an Application programming to generate menu driven customer driven billing system.
The = symbol is often used in mathematical operations. It is used to assign a value to a given variable. On the other hand, the == symbol, also known as "equal to" or "equivalent to", is a relational operator that is used to compare two values.
The || is also known as the OR operator in C programming. When using || to evaluate logical conditions, any condition that evaluates to TRUE will render the entire condition statement as TRUE.
FALSE. All reserved words must be written in lowercase; otherwise the C compiler would interpret this as unidentified and invalid.
In the first expression, the increment would happen first on variable a, and the resulting value will be the one to be used. This is also known as a prefix increment. In the second expression, the current value of variable a would the one to be used in an operation, before the value of a itself is incremented. This is also known as postfix increment.
The word void is a reserved word in C language. You cannot use reserved words as a user-defined variable.
Yes, that is allowed in C programming. You just need to include the entire function prototype into the parameter field of the other function where it is to be used.
When a function calls itself, and this process is known as recursion. The function that calls itself is known as a recursive function.

More Topics

Conclusion

So just feel confident during your viva interview and wish you the best of luck for your viva or interview. I hope these C questions and answers will help you to crack your exam easily.