0% found this document useful (0 votes)
5 views

C Programming Viva Questions

The document provides a list of common C programming questions and their answers, covering fundamental concepts such as data types, pointers, loops, recursion, and the main function. It explains key differences between operators, loops, and data structures like arrays and structures. Additionally, it highlights the use of standard functions like printf() and scanf() in C programming.

Uploaded by

palvishaal09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

C Programming Viva Questions

The document provides a list of common C programming questions and their answers, covering fundamental concepts such as data types, pointers, loops, recursion, and the main function. It explains key differences between operators, loops, and data structures like arrays and structures. Additionally, it highlights the use of standard functions like printf() and scanf() in C programming.

Uploaded by

palvishaal09
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

C Programming Viva Questions and Answers

1. What is C language?

C is a general-purpose, structured programming language developed by Dennis Ritchie. It is widely used for

developing system and application software.

2. What are the basic data types in C?

The basic data types in C are int, float, char, and double.

3. What is the difference between = and ==?

= is the assignment operator, and == is the equality comparison operator.

4. What is a pointer?

A pointer is a variable that stores the address of another variable.

5. What is the use of printf() and scanf()?

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?

An array is a collection of similar data types stored in contiguous memory locations.

8. What is the difference between while and do-while loop?

In while loop, the condition is checked before the loop runs. In do-while, the loop runs at least once before

checking the condition.

9. What is recursion?

Recursion is a technique where a function calls itself.

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.

11. What are header files?

Header files contain predefined functions and macros. Example: stdio.h, conio.h.

12. What is the purpose of main() function?

It is the entry point of any C program. Execution starts from main().


13. What is the use of getch()?

getch() is used to hold the output screen until a key is pressed (mainly in Turbo C).

14. What is a structure?

A structure is a user-defined data type that allows grouping variables of different types.

15. What is the difference between structure and array?

An array stores similar data types, while a structure can store different data types.

You might also like