What is the output of the following C Program?
Practice Variable Number of Arguments – What is the output of the following C Program?
#include
void main()
{
unsigned int i=65000;
while(i++!=0);
printf("%d",i);
}
Practice Variable Number of Arguments – What is the output of the following C Program?
#include
void main()
{
unsigned int i=65000;
while(i++!=0);
printf("%d",i);
}
Practice Variable Number of Arguments – What will be the output of the below C program.
#include
int main()
{
static int i=5;
if(--i){
main();
printf("%d ",i);
}
return 0;
}
Practice Variable Number of Arguments – What will be output of the following “c” code?
#include
int main(){
float **(*ptr)[4]=(float **(*)[4])0;
ptr+=5;
printf("%d %d",ptr,sizeof ptr);
return 0;
}
Practice Variable Number of Arguments – What will be output of the following “c” code?
#include
void main()
{
float me = 1.1;
double you = 1.1;
if(me==you)
printf("I love U");
else
printf("I hate U");
}
Practice Variable Number of Arguments – What will be output of the following “c” code?
#include
int main()
{
float i, j;
scanf(%f %f, &i, &j);
printf(%.2f %.3f, i, j);
return 0;
}
What will be the output for the give input 12.342 and 123.4568
Practice Variable Number of Arguments – In the following code segment what will be the result of the function
#include
int main(){
unsigned int x=-1;
int y;
y = ~0;
if(x == y)
printf("same");
else
printf("not same");
printf("%u %d",x,y);
return 0;
}
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;
}
Practice Variable Number of Arguments – Primitive data type are:
Practice Variable Number of Arguments – int *i;
float *f;
char *c;
Which are the valid castings?
Practice Variable Number of Arguments – What is the output of the program?
#include
int main()
{
extern int a;
printf("%d
",a);
return 0;
}
int a =20;
Practice Variable Number of Arguments – What is the output of the following program?
void main()
{
float balance, loan;
balance = 1000.0;
loan= balance/10;
if ((balance>500) || (loan < 500))
printf ("Good account/n ");
if (balance < 500) || (loan < 500)
printf("caution !/n");
}
Practice Variable Number of Arguments – What is the value of “final” after the following program executed?
void main()
{
int sum, index;
index = 0; sum=0; for(;;) {
sum = sum + index;
++index;
if (sum >= 100) break;
}
final = sum/index;
}
Practice Variable Number of Arguments – What will be output of the following “c” code?
#include
void main(){
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than");
}
Practice Variable Number of Arguments – What will be output of the following “c” code?
=>For input as 1 2
#include
int main(){
register int a,b;
int c;
scanf("%d%d",&a,&b);
c=~a + ~b + ++a + b++;
printf(" %d",c);
return 0;
}