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-4
We can easily access each element of array. Not necessity to declare too many variables. Array elements are sorted in continuous memory location.
Wastage of memory space. We cannot change size of array at the run time. It can store only similar type of data.
The starting address of the array is called as the base address of the array.
No, array subscripts should not have a negative value. Always, it should be positive.
If we start array index by 1 then we will not be able to access first location of an array.
A stream is a source of data or destination of data that may be associated with a disk or other Input/Output (I/O) device.
The source stream provides data to a program and it is known as input stream.
The destination stream receives the output from the program and is known as output stream.
A large program is subdivided into a number of smaller programs or subprogram. Each subprogram is called function. A function is a set of statements to perform a specific task.
An argument is an entity used to pass data from the calling function to a called function.
Formal arguments are the arguments available in the function definition.
Actual arguments are available in the function call.
There are two types of functions: 1) predefined function, 2) User defined function.
1) Reusability of code. 2) Debugging becomes easy and fast. 3) Compilation and execution time is reduced.
By default the functions are called by value.
There are three parts in every function: 1) Function Declaration, 2) Function Calling, 3) Function Definition.
Functions are declared within header file and defined in library (lib).
Prototype means function’s declaration. It tells return type, function name, and arguments type.
Any number of arguments can be passed to a function. There is no limit on this. Function arguments are stored in stack memory rather than heap memory. Stack memory allocation is depending on the operating system. So, any number of arguments can be passed to a function as much as stack has enough memory. Program may crash when stack overflows.

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.