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-3
For executing a set of statements fixed number of times we use for loop while when the number of iterations to be performed is not known in advance we use while loop
The functions that are predefined and supplied along with the compiler are known as builtin functions. They are also known as library functions.
Typecasting is a way to convert a variable/constant from one type to another data type.
Void is an empty data type that has no value. We use void data type in functions when we don't want to return any value to the calling functions.
Each and every smallest individual unit in a C program is known as tokens.
Operators are symbol which take one or more operands or expression and perform arithmetic or logical computation.
Operands are variables or expressions which are used in operators to evaluate the expression.
Combination of operands and operators from an expression.
Bitwise AND operator.
Yes, with loss of fractional part.
Operator precedence defines the order in which C evaluate expressions.
The operators of the same precedence are evaluated either from ‘left to right’ or from ‘right to left’, depending on the level. This is known as the associativity property of an operator.
Pre increment operator is used to increment variable value by 1 before assigning the value to the variable. Post increment operator is used to increment variable value by 1 after assigning the value to the variable.
Constant is a value that does not change during the program execution. A constant used in C does not occupy memory.
Variables are simply names used to refer to some location in memory, a location that holds a value with which we are working.
Keywords are building blocks for program statements and have fixed meanings and these meaning cannot be changed
During declaration we just specify the type and no memory are allocated to the variable. But during the definition, an initial value is assigned and memory is allocated to the variable.
Loops are used to repeat a block of code.
A nested loop a loop within loop, an inner loop within the body of an outer loop.
A loop running continuously for an indefinite number of times is called the infinite loop.
The break statement is used to exit the current loop before its normal ending.
goto statement is used to transfer the normal flow of a program to the specified label in the program.
1) Initialization: It provides beginning value of loop. 2) Termination condition: Termination condition specifies the ending of the loop. 3) Increment/Decrement: It increases or decreases loop counter.
An array is a collection of values of the same data type.
For executing a set of statements fixed number of times we use for loop while when the number of iterations to be performed is not known in advance we use while loop
The functions that are predefined and supplied along with the compiler are known as builtin functions. They are also known as library functions.
Typecasting is a way to convert a variable/constant from one type to another data type.
Void is an empty data type that has no value. We use void data type in functions when we don't want to return any value to the calling functions.
Each and every smallest individual unit in a C program is known as tokens.
Operators are symbol which take one or more operands or expression and perform arithmetic or logical computation.
Operands are variables or expressions which are used in operators to evaluate the expression.
Combination of operands and operators from an expression.
Bitwise AND operator.
Yes, with loss of fractional part.
Operator precedence defines the order in which C evaluate expressions.
The operators of the same precedence are evaluated either from ‘left to right’ or from ‘right to left’, depending on the level. This is known as the associativity property of an operator.
Pre increment operator is used to increment variable value by 1 before assigning the value to the variable. Post increment operator is used to increment variable value by 1 after assigning the value to the variable.
Constant is a value that does not change during the program execution. A constant used in C does not occupy memory.
Variables are simply names used to refer to some location in memory, a location that holds a value with which we are working.
Keywords are building blocks for program statements and have fixed meanings and these meaning cannot be changed
During declaration we just specify the type and no memory are allocated to the variable. But during the definition, an initial value is assigned and memory is allocated to the variable.
Loops are used to repeat a block of code.
A nested loop a loop within loop, an inner loop within the body of an outer loop.
A loop running continuously for an indefinite number of times is called the infinite loop.
The break statement is used to exit the current loop before its normal ending.
goto statement is used to transfer the normal flow of a program to the specified label in the program.
1) Initialization: It provides beginning value of loop. 2) Termination condition: Termination condition specifies the ending of the loop. 3) Increment/Decrement: It increases or decreases loop counter.
An array is a collection of values of the same data type.
More Topics
- Convert Difference between C and C++
- Write a C Program to check whether the number is Armstrong number or not
- Print Fibonacci Number
- 75+ Most Important C++ Interview Questions
- C Star Pattern Program
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.