Imp Ques & Viva Questions and ANSwers in C
Imp Ques & Viva Questions and ANSwers in C
Imp Ques & Viva Questions and ANSwers in C
2 marks
Introduction to Programming Languages
Basic of a Computer Program Algorithms
flowcharts
characteristics of algorithm
Constants
10 marks
UNIT II
2 marks
Break
Continue
10 marks
1 Decision statements (OR) Conditional statements (if, if-else, switch) with example
2. Looping / Iterative/Repetitive Control statement(for, while, do while) with example
UNIT III
2 marks
Define array. Declaration & Initialization of array
indexing
Differences between one-dimensional and two-dimensional arrays
Define string. Declaration & Initialization of string
10 marks
UNIT IV
2 marks
1. Define Pointer. Declaration & Initialization of pointer
2. dereferencing operator
3. address operator
4. Differences between structures and unions
10 marks
1. pointer and address arithmetic with example.
2. Explain Structures with example.
3. Explain Union with example
UNIT V
2 marks
1. Define function. and Declaration
2. Function Declaration
3. Scope and Lifetime of Variables
10 marks
3.What is a compiler?
Compile is a software program that transfer program developed in high level language into
executable object code
4.What is IDE?
The process of editing, compiling, running and debugging is managed by a single integrated
application known as Integrated Development Environment (IDE)
5.What is a program?
A computer program is a collection of the instructions necessary to solve a specific problem.
6.What is an algorithm?
The approach or method that is used to solve the problem is known as algorithm.
9.What is a Keyword?
Keywords are building blocks for program statements and have fixed meanings and these meanings cannot be
changed.
13.What are the Back Slash character constants or Escape sequence characters available in C?
Back Slash character constant are \t, \n, \0
14.What is a variable?
Variables are user-defined names given to memory locations and are used to store values. Variable
may have different values at different times during program execution
20.What is a Unary operator and what are the unary operators present in C?
An operator which takes only one operand is called unary operator. C unary operators are Unary
plus (+), Unary minus (-), Increment and Decrement operators (++,--), Address of operator (&),
Value at operator (*), sizeof operator, ones complement operator (~).
24.What are the format codes used in printf and scanf functions in C?
%c (for reading or printing a single character),
%d (for reading or printing signed integer),
%u (for reading or printing unsigned integer),
%ld (for reading or printing long signed integer),
%lu (for reading or printing long unsigned integer),
%f (for reading or printing floating point value),
%lf (for reading or printing double floating point value),
%Lf (for reading or printing long double value,
%s (for reading or printing string value)
27.Forms of IF statements?
Simple IF statement, IF-ELSE statement, NESTED IF-ELSE statement and ELSE IF ladder
32.What is a LOOP?
Loop is a sequence of statements that are executed repeatedly
38.What is an ARRAY?
Array is a collective name given to similar elements
47.What is the difference between reading strings using scanf and gets?
Scanf can not read strings with multiple words whereas gets can read strings with multiple words
50.What is a function?
Function is a self contained block of statement which is used to perform certain task
64.What is a structure?
Structure is a user-defined data type. Structure is a collective name given to dissimilar elements
70.What is a union?
Union is a user-defined data type which can store a value of different data types