main()
{
signed int bit=512, mBit;
{
mBit = ~bit;
bit = bit & ~bit ;
printf("%d %d", bit, mBit);
}
}
a. 0, 0
b. 0, 513
c. 512, 0
d. 0, -513
Answers were Sorted based on User's Feedback
Code for 1>"ascii to string" 2>"string to ascii"
1 Answers Aricent, Global Logic,
Write a C program to print ‘Campus Force training’ without using even a single semicolon in the program.
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }
writte a c-programm to display smill paces
prog. to produce 1 2 3 4 5 6 7 8 9 10
Which version do you prefer of the following two, 1) printf(“%s”,str); // or the more curt one 2) printf(str);
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
How to count a sum, when the numbers are read from stdin and stored into a structure?
4. Main() { Int i=3,j=2,c=0,m; m=i&&j||c&I; printf(“%d%d%d%d”,I,j,c,m); }
why java is platform independent?
main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }