main()
{
int i = 0xff ;
printf("\n%d", i<<2);
}
a. 4
b. 512
c. 1020
d. 1024
Answers were Sorted based on User's Feedback
Answer / pavan_mustyala
binary representation of 0xff is 11111111
left shift by 2 results in 1111111100 which is equivalent
to 1020 in decimal.
| Is This Answer Correct ? | 22 Yes | 0 No |
void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4
What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
main() { int i = 257; int *iPtr = &i; printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) ); }
How to use power function under linux environment.eg : for(i=1;i<=n;i++){ pow(-1,i-1)} since it alerts undefined reference to 'pow'.
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
void main() { int k=ret(sizeof(float)); printf("\n here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }
Write a function to find the depth of a binary tree.
13 Answers Adobe, Amazon, EFI, Imagination Technologies,