Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Department of Computer Science and Engineering

C programming Viva Questions


1. What is Compiler?
Compiler is a program that converts human readable code (source code) into
machine readable code, this process is called compilation.
2. What is Interpreter?
Interpreter converts human readable code (source code) into intermediate
code and then this intermediate code is executed line by line.
3. What is Assembler?
Assembler is a program that converts assembly level language (low level
language) into machine level language.
4. What is C Programming Language?
C is a high level programming language. It is used to develop system
software and application software.
5. C language has been developed in which language?
C language has been developed using assembly language.
6. Is C a Structured Programming Language?
Yes, C language is structured language.
7. C is successor of which programming language?
B
8. What is Algorithm?
An algorithm refers to the step by step instructions written to solve any
problem.
9. What is Flowchart?
A flowchart is a diagrammatic or symbolic representation of an algorithm. It
uses various symbols to represent the operations to be performed.
10. What are Library Functions?
Library functions are predefined functions and stored in .lib files.
11. What is a Program?
A computer program is a collection of the instructions necessary to solve a
specific problem.
12. What is void in C language?
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.
13. What is the use of printf () function?
The printf () function is used to print the integer, character, float and string
values on to the screen or console. It is a predefined function.
14. What is the use of scanf () function?
The scanf () function is used to take input from the user or read some values
from screen (or console). It is a predefined function.
15. What is Console?
Console is known as output screen through which user interacts with the
source code.
16. What is # include?
It is a pre-processor directive. It is used to include any header file in our
program.
17. Who designed C Programming Language?
Dennis M Ritchie
18. What is Debugging?
Debugging is the process of identifying errors within a program.
19. What is Syntax Error?
Syntax errors occur at the time of compilation. It comes when rules of
programming language are not followed properly.
20. What is Logical Error?
Logical errors occur at the time of execution. It comes when logics are not
properly implemented in the program.
21. What are Data Types present in C?
Primary or Fundamental Data types (int, float, char), Derived data types
(arrays, pointers) and user-defined data types (structures, union).
22. What are built in functions?
The functions that are predefined and supplied along with the compiler are
known as built-in functions. They are also known as library functions.
23. What is token in C language?
Each and every smallest individual unit in a C program is known as tokens.
24. What are operators?
Operators are symbol which take one or more operands or expression and
perform arithmetic or logical computation.
25. What is variable?
Variables are user-defined names given to memory location and are used
store values. A variable may have different values at different times during
program execution.
26. What are operands?
Operands are variables or expressions which are used in operators to
evaluate the expression.
27. What are expressions?
Combination of operands and operators from an expression.
28. What is a keyword?
Keywords are building blocks for program statements and have fixed
meanings and these meaning cannot be changed.
29. What is identifier?
Identifier is user-defined names given to variables, functions and arrays.
30. What is loop?
Loops are used to repeat a block of code.
31. What is an array?
An array is a collection of values of the same data type.
32. What is function?
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.
33. What is an argument?
An argument is an entity used to pass data from the calling function to a
called function.
34. What are formal arguments?
Formal arguments are the arguments available in the function definition.
35. What are actual arguments?
Actual arguments are available in the function call.
36. How many types of functions are there in C language?
There are two types of functions: 1) predefined function, 2) User defined
function.
37. What is union?
The union is a user-defined data type that allows storing multiple types of
data in a single unit. However, it doesn’t occupy the sum of the memory of
all members’. It holds the memory of the largest member only.
38. What is recursive function?
A function calling itself is called as recursive function.
39. What is pointer variable?
A pointer is a variable that can store the address of another variable.
40. What is structure?
The structure is user-defined data type. The structure is a collective name
given to dissimilar elements.
41. Define string?
An array of characters.
42. What is typecasting?
Typecasting is a way to convert a variable/constant from one type to another
data type.
43. What is loop?
Loops are used to repeat a block of code.
44. What is nested loop?
A nested loop a loop within loop, an inner loop within the body of an outer
loop.
45. What is infinite loop?
A loop running continuously for an indefinite number of times is called the
infinite loop.
46. What is break statement?
The break statement is used to exit the current loop before its normal ending.
47. How many types of operators are there in C?
C consist Arithmetic Operators (+, -, *, /,%), Relational Operators (<, <=, >, >=, !=),
Logical Operators (&&, ||, !), Assignment Operators (=, +=, -=, *=, /=), Increment and
Decrement Operators (++, --), Conditional Operator(?:), Bitwise
Operators(<<, >>, ~, &, |, ^) and Special Operators (. , ->, &, *, size of).
48. What is the difference between structures and unions?
Structures can store several values at a time whereas unions can store one value at a
time. A structure size becomes sum of all its members whereas a union size
becomes size of a member whose size is largest

You might also like