![]()
Practice Control Instructions – Predict the output of following “C” code:
#include
main()
{
int a=100,b=300;
if(a>50)
a=200;
b=400;
printf("%d",b);
} ![]()
Practice Control Instructions – Predict the output of following “C” code:
#include
main()
{
int a=100,b=300;
if(a>50)
a=200;
b=400;
printf("%d",b);
} ![]()
Practice Declarations and Initializations – What will be output of the following “C” code?
main()
{
int i=-1;
-i;
printf("%d,%d",i,-i);
} ![]()
Practice Variable Number of Arguments – Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1?
![]()
Practice Expressions – Predict the output of following code:
main()
{
int a=2;
if(a-- , --a, a)
printf("Tom");
else
printf("Jerry");
} ![]()
Practice Basic Concept – Predict the output of following “C” code:
void main()
{
if( printf(""))
printf("Face");
else
printf("Focus");
} ![]()
Practice Control Instructions – Predict the output of following “C” code:
void main()
{
int a,x=2,3,4,5;
a=1,2,3,4,5;
printf("%d%d",x,a);
} ![]()
Practice Expressions – What will be output of the following “C” code?
#include
void main()
{
int a=10,x=20;a=a++ + 10;
x=x++ + ++a;
printf("%d,%d",a,x);
} ![]()
Practice Arrays – What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?
![]()
Practice Functions – Is there any difference int the following declarations?
int fun(int arr[]);
int fun(int arr[2]);
![]()
Practice Control Instructions – Predict the output of following “C” code:
void main()
{
if(5,4,3,2,1,? 0 ? )
printf("True");
else
printf("False");
} ![]()
Practice Control Instructions – Predict the output of following “C” code:
#include
void main()
{
int a,x=(2,3,4,5);
a=1,2,3,4,5;
printf("%d,%d",x,a);
} ![]()
Practice Basic Concept – What is the output for following?
void main()
{
printf("%%%%");
} ![]()
Practice Basic Concept – Predict the output of following “C” code:
main()
{
int var=20;
printf("%d,",var);
{
int var=30;
printf("%d",var);
}
} ![]()
Practice Functions – What will be output of the following “c” code?
#include
int main(){
int i=3,val;
val=sizeof (f(i)+ +f(i=1)+ +f(i-1));
printf("%d %d",val,i);
return 0;
}
int f(int num){
return num*5;
} ![]()
Practice Expressions – Predict the output of following “C” code:
#include
void main()
{
int a=10,x;
x= a-- + ++a;
printf("%d",x);
}