Viva Questions For C lab Examination...
1. C is ----------------type of language ?
Ans-Procedural.
2.Which are primitive datatypes in C?
Ans-int,Float,Char,Double,void ;
3.Memory size 0f int datatype?
Ans-2 bytes
4.Memory size of Character Datatype?
Ans-one bytes
5.Memory size of Float Datatype?
Ans-4 Bytes
6.What will be output of following code?
while(1)
{
printf("A");
}
Ans- Character A will be pritented on Screen until Heap memory is full. After that program terminates..
7.Difference b/w while and do...While?
Ans- While is Entry control loop.
Do While is Exit control Loop.
8.Which are user defined data types in C ?
Structure , Enumeration
9. What will following Statement indicates?
const int Key=10;
Ans- key is declared as Constant throughout the program key will have value 10
10.Difference b/w function declaration and function defenition?
Ans- Declaration means declaring a function.
eg- int sum(int,int);
It tell the compiler that we will use this function.
Defention means we are telling what the function will do..
eg- int sum(int a,int b)
{
int sum;
sum=a+b;
return(sum);
}
11.Syntax for function defenition?
returntype function name( datatype argument1,datatype argument1,.........argument n)
{
//statements
return( return value);
}
Related Posts:--
Data Structures Viva Questions