You are on page 1of 4

WRITE THE OUTPUTS OF ALL THE PROGRAMS:

1. What will be the output of the following? statement ?printf( 3 + "goodbye");


Answer:

2)What will be the output of the following? statements ?

int a = printf("00");
printf("%d",a);
Answer:

3)What will be the output of the following?

int i = 3;
printf("%d%d",i,i++);
Answer:

4)What will be the output of the following? arithmetic expression ?5+3*2%10-8*6

Answer:

5)What will be the output of the following statement ?


printf("hello""""world");
Answer:

6)What will be the output of the following?


#include<stdio.h>
main()
{
int c=- -2;
printf("c=%d",c);
}
Answer:
7)#include<stdio.h>
main()
{
register i=5,k;
char j[]= "hello";
k=i++ - i;
printf("%s %d",j,k);
}
Answer:

8)#include<stdio.h>
main()
{
int i=5,j=6,z;
printf("%d",i+++j);
}
Answer:

9)What will be the output of the following?


#include<stdio.h>
main()
{
int i=400,j=300;
printf("%d..%d",i++,j);
}
Answer:

10)What will be the output of the following?

#include<stdio.h>

int main()
{

printf("%d",printf("computer"));
return (0);
}
Answer:

11)What will be the output of the following?


#include <stdio.h>
int main()
{
int rows, i, j, number= 1;
rows=5;

printf("Number of rows =5\n");


for(i=1; i <= rows; i++)
{
for(j=1; j <= i; ++j)
{
printf("%d ", number);
++number;
}

printf("\n");
}

return 0;
}

Answer:

12)What will be the output of the following?


#include<stdio.h>

int main()
{
int i;

for(i=0;i<5;i++)
{
int i = 10;

printf("%d",i);
}
return (0);
}
Answer:

13) What will be the output of the following?


#include <stdio.h>
int x=50;
int main()
{
int x=100;
{
extern int x;
printf("x= %d\n",x);
}
printf("x= %d\n",x);
return 0;
}
Answer:

14) What will be the output of the following?


#include <stdio.h>
int main()
{
int i = 0;
int j = i++ ++i + i;
j++;
printf("i=%d j=%d \n",j,i);
}
Answer:

15) write the exact output of the program bellow

#include <stdio.h>
#define sbit main
techathon()
{
printf("learn programing in a new way \n");

return 0;
sbit();
}

sbit()
{
printf("welcome to sbit \\*_*/ \n");
techathon();
}
Answer:

You might also like