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

Important Questions for Viva Programming in C

Chapter 1: Introduction
1. What is program? What is programming?
Ans:
• Program is set of instructions to computer.
• Programming is the process of writing program using specific programming language.
2. What is software?
Ans:
• Software is the collection of programs which is used for solving specific problem.
• Example: AutoCad, SAP, DevC++ etc.
3. What are types of translators?
Ans:
• Translators are the system software that are used to translate Assembly level/ High level
language into low level (binary) language.
• Types of Translators:
a) Assembler (Assembly Language to Low Level Language)
b) Compiler (High Level Language to LLL whole program)
c) Interpreter (High Level Language to LLL line by line)

Chapter 2: Programming Logic


1. What are steps to solve a problem using computer?
Ans:
a) Problem Analysis and Feasibility Study
b) Algorithm and Flowchart Design
c) Coding
d) Testing and Debugging
e) Implementation
f) Evolution and Maintenance
g) Documentation
2. What is algorithm?
Ans: Algorithm is step by step solution of problem.
3. What is flowchart?
Ans: Flowchart is the graphical/pictorial representation of algorithm.
4. What are basic shapes used in flowchart?
Ans:
Start/Stop => Oval
Connector => Circle
Input/Output => Parallelogram
Process/ calculation => Rectangle
Decision => Diamond

United Technical College, Bharatpur, Chitwan


Sequence flow => arrow
5. Compare algorithm with flowchart.
Ans:
• Algorithm is written in textual form. Whereas flowchart is written in graphical form.
• Algorithm is developed before flowchart.
• Flowchart is easier to understand than algorithm.
6. What is validation and verification?
Ans:
Verification ensures that the program does what the programmer intends to do.
Validation ensures that the program produces the correct results for a set of test data.
7. What is Black box testing and White box testing?
Ans:
• Black box testing is the Software testing method which is used to test the software
without knowing the internal structure of code or program.
• White box testing is the software testing method in which internal structure is being
known to tester who is going to test the software.
8. What is debugging?
Ans:
Debugging is the process of identifying and removing errors from computer hardware or
software.
9. What is documentation? Why it is required?
Ans:
• Documentation is any communicable material that is used to describe, explain or
instruct regarding some attributes of an object, system or procedure, such as its parts,
assembly, installation, maintenance and use.
• Documentation can be provided on paper, online, or on digital or analog media, such as
audio tape or CDs.
• Examples are user guides, white papers, online help, and quick-reference guides.

Chapter 3: Variable and Data Types


1. What is variable?
2. What is constant? With types.
3. What is identifier?
4. What is data type? With types.
5. What is ASCII?
6. What is escape sequence?
7. What are operators and operands?
8. What are unary, binary and ternary operators? With example.
9. What are Arithmetic operators?
10. What are Relational Operators?
11. What are Logical operators?

United Technical College, Bharatpur, Chitwan


12. What are Assignment operators?
13. What are bitwise operators?
14. What are increment/decrement operators?
15. What is difference between pre-increment and post-increment?
16. What is formatted and unformatted functions?
17. Write Syntax of scanf() and printf() functions.
18. Why are scanf() and printf() functions used?
19. Why are getchar(), getche(), getch() functions used?
20. Why are putchar(), putch() function used?
21. Why gets() and puts() are used?
22. Differentiate gets() and scanf().
23. Why is clrscr() used?
24. Why is exit() function used?
25. Why do you use sqrt(), pow() functions?
26. Why do we write #include <stdio.h>?

Chapter 4: Control Structures


1. What is control statements? What are its types?
2. What is Sequential statement?
3. What is Branching statement? With types.
4. What is Looping statement? With types.
5. What is jumping statement? With types.
6. What is if statement? How do you use? With example.
7. What is if-else statement? How do you use? With example.
8. What is nested if else statement? How do you use? With example.
9. What is if else if statement? How do you use? With example.
10. What is switch statement? How do you use? With example.
11. Compare if else if with switch statement.
12. What is entry-controlled loop? Examples.
13. What is exit-controlled loop? Example.
14. Compare entry-controlled and exit-controlled loop.
15. Compare while and do-while loop.
16. What is break statement? Why do you use?
17. What is continue statement? Why do you use?
18. What is goto statement? Why do you use?
19. Why is goto statement being avoided?
20. Compare break and continue statement.

Chapter 5: Array and String


1. What is array? With example.
2. What are types of array?
3. What is 1D array? With example.

United Technical College, Bharatpur, Chitwan


4. What is 2D array? With example.
5. What is string?
6. Write any 7 string handling functions.
7. Why is strlen() used?
8. Why is strlwr() used?
9. Why is struppr() used?
10. Why is strrev() used?
11. Why is strcmp() used?
12. Why is strcpy() used?
13. Why is strcat() used?
14. How do declare variable to add names of 48 students?

Chapter 6: Functions
1. What is function?
2. Why is function used in program?
3. What are types of function?
4. Compare library function and user-defined function.
5. Write examples of any 6 Library functions.
6. What are types of functions according to return type and parameter.
7. What are the components of function?
8. What is function prototype?
9. Differentiate between function prototype and function definition.
10. What are information received compiler from a function prototype?
11. What is formal parameter/argument?
12. What is actual parameter/argument?
13. Why return statement is used in function?
14. What is recursive function?
15. What are two conditions required to construct recursive functions?
16. Compare recursive function and iteration.
17. What is macro?
18. What is preprocessor directive?
19. Compare function and macro.
20. Compare pass by value and pass by reference.
21. How do you return multiple values from a function?

Chapter 7: Pointers
1. What is pointer?
2. How do you declare pointer?
3. Do you return multiple values using pointer?
4. Compare array and pointer.
5. What is NULL pointer?
6. What is bad pointer?

United Technical College, Bharatpur, Chitwan


7. What is void pointer?
8. What is pointer to pointer?
9. Differentiate pointer to array and array of pointer.
10. What is DMA?
11. What are functions used to accomplish DMA in C?
12. Compare Dynamic Memory Allocation to Static Memory Allocation.

Chapter 8: Structure and Union


1. What is structure? Why do structure use?
2. What is Union? Why do union use?
3. Compare Array and Structure.
4. Compare Structure and Union.
5. What is nested structure? With example.
6. What is self-referential structure?
7. What are limitations of union?
8. How do you declare structure pointer?

Chapter 9: Files and File Handling


1. What is file?
2. Why do you need file?
3. Why is file pointer used?
4. What are file opening modes?
5. What is binary file?
6. What are functions used for writing to file and reading from file?

United Technical College, Bharatpur, Chitwan

You might also like