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 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 Bitwise Operators – What will be output of the following “c” code?


#include
void main()
{
printf(" %x", -1<<4);
}

What will be the output of the following program on GCC compiler?

Loading

Practice Bitwise Operators –

What will be the output of the following program on GCC compiler?

#include<stdio.h>  
int main() {
unsigned int i = 0x80;
printf("%d ", i<<1);
return 0;
}

What will be the output of the following program on GCC compiler?

Loading

Practice Bitwise Operators –

What will be the output of the following program on GCC compiler?

#include<stdio.h> 
int main() {
int x, y, z;
x=y=z=1;
z = ++x || ++y && ++z;
printf("x=%d, y=%d, z=%d ", x, y, z);
return 0;
}

What will be the output of the following program on GCC compiler?

Loading

Practice Bitwise Operators –

What will be the output of the following program on GCC compiler?

#include<stdio.h> 
int main() {
int x = 10, y = 20;
if(!(!x) && x)
printf("x = %d ", x);
else
printf("y = %d ", y);
return 0;
}