What will be output of following c program?

			  		

Loading

Practice Control Instructions – What will be output of following c program?


#include
int main(){
int i=0;
for(i=0;i<20;i++){
switch(i){
case 0:i+=5;
case 1:i+=2;
case 5:i+=5;
default: i+=4; break;
}
printf("%d ",i);
}
return 0;
}

What will be output of following c program?

			  		

Loading

Practice Variable Number of Arguments – What will be output of following c program?


#include
int main(){
enum number { a=-1, b= 4,c,d,e};
printf("%d",e);
return 0;
}

What will be output of following c program?

			  		

Loading

Practice Declarations and Initializations – What will be output of following c program?


#include
long unsigned static const ddlg(){
static const long unsigned a=0101;
return a;
}
int main(){
long number;
number=ddlg();
printf("%X",number);
return 0;
}

User defined data types are:

Loading

Practice Basic Concept – User defined data types are:

Derived data types are:

Loading

Practice Basic Concept – Derived data types are:

What will be the output of the following “C” program?

Loading

Practice Control Instructions – What will be the output of the following “C” program?


#include
int main(){
char c=-64;
int i=-32;
unsigned int u =-16;
if(c>i){
printf("pass1");
if(c printf("pass2");
else
printf("Fail2");
}
else
printf("Fail1รƒยขรขย‚ยฌร‚ย);

if(c==i)
printf("pass2");
else
printf("Fail2");
return 0;
}

What will be the output of the following “C” program?

Loading

Practice Pointers – What will be the output of the following “C” program?


struct adr {
char *name;
char *city;
int zip;
};
struct adr *adradr;

Which are valid references?

What will be the output of the following “C” program?

Loading

Practice C Preprocessor – What will be the output of the following “C” program?


#include
#define max(a,b) (a>b?b:a)
#define squre(x) x*x
int main()
{
int i = 2, j = 3, k = 1;
printf ("%d %d", max(i,j), squre(k));
return 0;
}

float x, y, z;
scanf (“%f %f”, &x, &y);

If input st

Loading

Practice Input / Output – float x, y, z;
scanf (“%f %f”, &x, &y);

If input stream contains “4.2 3 2.3 …”
What will x and y contain after scanf?

What will be the output of the following “C” program?

Loading

Practice Command Line Arguments – What will be the output of the following “C” program?


#include
int main(x,y)
int x; char *y[];
{
printf("%d %s", x, y[1]);
return 0;
}

output when invoked as a.out arg1

Primitive data type are:

Loading

Practice Variable Number of Arguments – Primitive data type are: