How many times will the printf statement be executed?

Loading

Practice Bitwise Operators – How many times will the printf statement be executed?


void main()

{

int n; n=10;

while(n < 10){

printf ("hello");

--n;

} }

What will be the value of sum after the following C program is execute

Loading

Practice Control Instructions – What will be the value of sum after the following C program is executed?


void main()

{

int sum, index

sum= 1;

index= 9;

do {

index = index - 1;

sum =2* sum;

} while(index > 9);

}

What will be value of count after the following C program is executed?

Loading

Practice Bitwise Operators – What will be value of count after the following C program is executed?


void main()
{
int count, digit = O;
count= 1;
while (digit <= 9){
printf ("%d/n", ++count);
++ digit;
}

What will be output of the following “c” code?

Loading

Practice Declarations and Initializations – What will be output of the following “c” code?


#include
void main ( )
{
int a=500, b=100,c;
if( !(a>=400))
b=200;
c=200;
printf( "%d %d", b,c);
}

What will be output of the following “c” code?

Loading

Practice Declarations and Initializations – What will be output of the following “c” code?


#include
void main ( )
{
int i;
for( i=0; i<10; i++,printf("%d", i));
}

What will be output of the following “c” code?

Loading

Practice Basic Concept – What will be output of the following “c” code?


#include
void main ( )
{
printf(" Hello");
printf(" world");
printf("
Cup");
}

What will be output of the following “c” code?

Loading

Practice Basic Concept – What will be output of the following “c” code?


#include
void main ( )
{
printf(5+"Hello world");
}

What will be output of the following “c” code?

Loading

Practice Expressions – What will be output of the following “c” code?


#include
void main ( )
{
int c = --2;
printf("%d" , c);
}

What will be output of the following “c” code?

Loading

Practice Expressions – What will be output of the following “c” code?


#include
void main ( )
{
int i=5;
printf("%d %d %d %d %d", i++, i--,++i, --i, i);
}

What will be output of the following “c” code?

Loading

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


#include
#define a 10
void main( )
{
#define a 50
printf("%d",a);
}

What will be output of the following “c” code?

Loading

Practice Control Instructions – What will be output of the following “c” code?


#include
void main()
{
char ch;
for(ch =1; ch<=255; ch++)
printf("%d %c", ch, ch);
}

What will be output of the following “c” code?

Loading

Practice Arrays – What will be output of the following “c” code?


#include
void main()
{
int i, a[50]={1,2,3,4,5};
for( i=0; i<5; i++)
printf("%d",*a++);
}