6. What will be the output given program?
#include<stdio.h>
void main()
{
int i = -10;
for(;i;printf("%d ", i++));
}
#include<stdio.h>
void main()
{
int i = -10;
for(;i;printf("%d ", i++));
}
7. What will be the output of the given program?
#include<stdio.h>
void main()
{
int a=11,b=5;
if(a=5) b++;
printf("%d %d", ++a, b++);
}
#include<stdio.h>
void main()
{
int a=11,b=5;
if(a=5) b++;
printf("%d %d", ++a, b++);
}
8. What will be the output of the given program?
#include<stdio.h>
void main()
{
int value=0;
if(value)
printf("well done ");
printf("examveda");
}
#include<stdio.h>
void main()
{
int value=0;
if(value)
printf("well done ");
printf("examveda");
}
9. What will be the output of the given program?
#include<stdio.h>
void main()
{
int value1, value2=100, num=100;
if(value1=value2%5) num=5;
printf("%d %d %d", num, value1, value2);
}
#include<stdio.h>
void main()
{
int value1, value2=100, num=100;
if(value1=value2%5) num=5;
printf("%d %d %d", num, value1, value2);
}
10. What will be the output of the given program?
#include
void main()
{
float num=5.6;
switch(num){
case 5:printf("5");
case 6:printf("6");
default : printf("0");
break;
}
printf("%d", num);
}
#include
void main()
{
float num=5.6;
switch(num){
case 5:printf("5");
case 6:printf("6");
default : printf("0");
break;
}
printf("%d", num);
}