Académique Documents
Professionnel Documents
Culture Documents
C viva Questions:
1. Algorithm :
Finite step by step method to solve a problem.
2. Flow chart:
Step by step pictorial Representation to solve a problem.
3. Source code: Human Readable form of a program.
4. Object Code: Machine Readable form of Code.
5. Compilation: A translator that converts a program from source code to object
code. (Alt+F9).
6. Execution (Run): CTRL+F9
7. C : invented by Denis Ritchie, At A&T BELL LABS in 1972
8. C procedure oriented language (function oriented)
9. Constant : that are fixed
10. Variable: That are not fixed. Vary during program execution.
11. Variable declaration: int a; float b; char c; double d;
12. Variable initialization (Assignment): a=2, b=4.5, c=a,
d=4.56784352134567;
13. Data type: Data type tells what type of value a variable will contain
Fundamental Data type also called Basic data type (char (1 byte), int
(2bytes), float (4 bytes), double (8 bytes), void ) . Derived data type
(function, Array, structure, union, pointer). User defined ( typedef , enum ).
14. Data Extension:
i. Short: Use efficiently allocated space.
ii. Long: increase the capacity of data type (int 2 bytes , long int
4 bytes)
iii. Signed: store one bit for sign (+ or -) rest are used for data
storage. Like int is of 2 bytes(16bits) 1 bit is used to store sign
and other 15 bits are used to store data hence range is -215 to
215 (-32768 to +32767)
iv. Unsigned: use to store Positive values all bits are used to store
data. Like int is of 2 bytes (16 bits). Here all bits are used to
store data. Because it is always positive so its range is 0 to 216 (
0 to 65535).
15. Operator: Used to perform operation on operands.
a. Arithmetic operator: +,-,/,%,* (Highest priority (/,*,%), Lowest (+,-)
b. Relational : > ,< ,<=,>= ,!=, = =
c. Assignment: =
d. Conditional: exp1? Exp2: exp2
e. Increment / Decrement : ++ ,- f. Bitwise : &, ^, , << , >>
g. Logical: &&, , !
h. Special operator: * (Value at address), &(Address of ), (.) member
selection), -> ( Membership operator ).
16. Statement: Statement are used to create program. Everything written in c is a
statement.
i. Non executable: Pre-processor (#include<stdio.h>),
Comments (// ), Declaration statement ( int a;).
ii. Executable: compound statement, Expressions, Control flow
statements.