C Programming Viva/Interview 20 Questions answer

1964
c

A list of most top frequently asked interview questions and answers of C Programming Viva/Interview are given below.

1) What is C language?

C is a general-purpose, imperative, procedural programming language that supports multiple programming paradigms (including imperative, declarative, functional, and object-oriented). It is distinct from C++ in that it does not have a pointer data type, does not support automatic memory management, and is not object-oriented.

2) Who developed C language and when ?

Dennis Ritchie developed c language in 1972 at bell laboratories of AT&T.

3) What are the main features of the C language?

C is a simple language because it follows the structured approach, i.e., a program is broken into parts, simple, portable, structured, fast, memory management, and extensible.

4) What is the use of printf() and scanf() functions?

The functions printf() and scanf() are used to display information and input data respectively.

Also Read:-C programming (Array) computer project Class 10

5) What are the difference between the local variable and global variable in C language ?

C Programming Viva/Interview

6) What are the use of a static variable in C?

The static variable are used as a common value which is shared by all the methods.

  • A variable which is declared as static is known as a static variable. It retains its value between multiple function calls.
  • Static variables are used because the scope of the static variable is available in the entire program. So, we can access a static variable anywhere in the program.
  • The static variable is initially initialized to zero. If we update the value of a variable, then the updated value is assigned.

7) What is the use of the function in C?

It is used to avoid the rewriting the same code again and again in our program, can be called any number of times from any place of our program.

Any part of our program can easily be tracked when a program is divided into functions,

8) What is the difference between call by value and call by reference in C?

call by value and call by reference in C :-

9) What is recursion in C Language?

When any function calls itself, then this process is known as recursion. Recursive function are comes in two phases:

  1. Winding phase
  2. Unwinding phase

Winding phase: When the recursive function calls itself, & this phase ends when the condition is reached.

Unwinding phase: Unwinding phase starts when the condition is reached, & the control returns to the original call.

10) What is an array in C?

May you Interested: Security Issues/Breaches In Cyber Space (Cyber Security and law)

An array is an ordered collection of elements. It is sometimes called an array of data, vector, or simply an array. Arrays can be one-dimensional (arrays of integers, for example) or two-dimensional (arrays of rows and columns). Arrays are useful for organizing data, and for manipulating it.

11) What is a pointer in C?

Pointers are variables that point to another location in memory. They can be used in two ways: to store a value at a given address, or to indicate the address of a value.

12) What is a NULL pointer in C?

When we assign a ‘0’ value to any pointer of any type, then it becomes a Null pointer.

13) Can we compile a program without main() function?

Yes, we can compile the program, but it can’t be executed.

But, if we use #define, we can compile and run a C program without using the main() function.

Computer Science Project Work class 10th (String Manipulation)

14) What is a token in C language?

Pointers are variables that point to another location in memory. They can be used in two ways: to store a value at a given address, or to indicate the address of a value.

Web Technologies

LEAVE A REPLY

Please enter your comment!
Please enter your name here