What is printed?
#include <stdio.h>
main()
{
int i, j, k;
i = 1; j = 0; k = 3;
1 printf("%d, ", k<<i);
2 printf("%d, ", !j);
3 printf("%d, ", ~j);
4 printf("%d, ", i & k);
5 printf("%d, ", i && k);
6 printf("%d, ", i ^ j);
7 printf("%d, ", i | k);
8 printf("%d, ", i || k);
printf("\n");
}
6, 1, -1, 1, 1, 1, 3, 1,
This is program
ex4.c
Previous slide
Next slide
Back to first slide
View graphic version