PPS Viva Questions
PPS Viva Questions
2.What is a compiler?
3.What is an algorithm?
Ans: The approach or method that is used to solve the problem is called an
algorithm.
symbols.
6.What is an identifier?
Ans: Identifiers are user-defined names given to variables, functions, and arrays.
7.What are the Back Slash character constants or Escape sequence characters
available in C?
8.What is a variable?
Ans: Variables are user-defined names given to memory locations and are used to
store values. A variable may have different values at different times during
program execution.
Ans: Primary or Fundamental Data types (int, float, char), Derived Datatypes (arrays,
pointers), and User-Defined data types (structures, unions, enum).
Example 1: int a, b;
Example 2: float p, q;
Ans: C consists of Arithmetic Operators (+, -, *, /, %), Relational Operators (<, <=, >,
>=, !=), Logical Operators (&&, ||, !), Assignment Operators (=, +=, -=, *=,
/=), Increment and Decrement Operators (++, --), Conditional Operator(?:), Bitwise
Operators(<<, >>, ~, &, |, ^), and Special Operators (., ->, &, *, sizeof).
13.What is a Unary operator and what are the unary operators present in C?
Ans: An operator which takes only one operand is called a 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 (~).
Ans: The modulus operator produces the remainder of an integer division. It cannot
be used on floating-point data.
Ans: Values of variables and results of expressions can be displayed on the screen
using printf functions. Values to variables can be accepted through the
16.Forms of IF statements?
Ans: Simple IF statement, IF-ELSE statement, NESTED IF-ELSE statement, and ELSE
IF ladder.
18.What is a loop?
Ans: Loop is a sequence of statements that runs repeatedly.
22.What is an array?
Ans: A variable can store only one value at a time whereas an array variable can store
several values at a time.
Ans: An array which can store several characters is called a character array.
27.What is a function?
Ans: The function is a self-contained block of the statement which is used to perform
a certain task.
Ans: Printf, scanf, clrscr, gotoxy, string handling functions, and file handling
functions.
Ans: A pointer variable is a variable that can store the address of another variable.
Ans: A pointer variable irrespective of its type occupies two bytes in memory.
36.What is a structure?
Ans: The structure is user-defined data typed. The structure is a collective name
given to dissimilar elements.
Ans: Sum of all the members' sizes becomes the structure size.
40.What is a union?
Ans: Union is a user-defined data type that can store a value of different data types.
Ans: fopen, fclose, ffgetc, fputc, fgets, fputs, fprintf, fscanf, fread, fwrite, fseek
43. What are the file opening modes present in C?
Ans- We can use structure members using arrow operator with its pointer.