C Programming VIVA Question and Answer
C Programming VIVA Question and Answer
C Programming VIVA Question and Answer
1. What is Program?
A computer program is a collection of instructions that can be executed by
a computer to perform a specific task.
2. What is Algorithm?
Algorithm is a step-by-step procedure, which defines a set of instructions to be
executed in a certain order to get the desired output.
3. What is Flowchart?
Flowchart is a graphical representation of an algorithm are program.
4. What is Variables?
Variables are the names you give to computer memory locations which are used
to store values in a computer program.
5. What is Constant?
Data values that stay the same every time a program is executed are known
as constants.
6. What is Datatype?
Datatype determines the type and size of data associated with variables.
7. Basic Datatypes:
a. int - used to define numeric variables holding whole numbers.
b. Float - used to define numeric values with floating decimal points
c. char - used to store a single character.
d. Double - Double is more precise than float.
e. Void - void actually refers to an object that does not have a value of any type.
8. What is arrays?
Arrays a kind of data structure that can store a fixed-size sequential collection
of elements of the same type.
13.What is if?
The if statement allows you to control if a program enters a section of code or
not based on whether a given condition is true or false.
14.What is if else?
The if...else statement executes two different codes depending upon whether
the test expression is true or false.
15.What is switch?
The switch statement is a multiway branch statement. It provides an easy way
to dispatch execution to different parts of code based on the value.
25.Types of function?
Standard library functions: are the functions which are declared in the C
header files such as scanf (), printf (), gets (), puts () etc.
User-defined functions: are the functions which are created by the C
programmer, so that he/she can use it many times. It reduces the complexity of a
big program and optimizes the code.
26.What is structure?
The structure is a user-defined data type in C, which is used to store a
collection of different kinds of data.
27.What is pointer?
A pointer is a variable whose value is the address of another variable.
Ex: int *p;
28.What is scanf?
The scanf () is one of the commonly used function to take input from the user.
The scanf () function reads formatted input from the standard input such as
keyboards.
29.What is printf?
The printf () is a library function to send formatted output to the screen. The
function prints the string inside quotations.
33.What is computer?
A computer is an electronic device that manipulates information, or data. It has
the ability to store, retrieve, and process data.
34.What is software?
Software is a collection of instructions and data that tell a computer how to
work.
35.What is hardware?
Computer hardware is the collection of physical parts of a computer system.