main()
{
int i = 258;
int *iPtr = &i;
printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) );
}
Answer / susie
Answer :
2 1
Explanation:
The integer value 257 can be represented in binary as,
00000001 00000001. Remember that the INTEL machines are
‘small-endian’ machines. Small-endian means that the lower
order bytes are stored in the higher memory addresses and
the higher order bytes are stored in lower addresses. The
integer value 258 is stored in memory as: 00000001 00000010.
Is This Answer Correct ? | 9 Yes | 0 No |
Find the largest number in a binary tree
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
main() { int i=400,j=300; printf("%d..%d"); }
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
In a gymnastic competition, scoring is based on the average of all scores given by the judges excluding the maximum and minimum scores. Let the user input the number of judges, after that, input the scores from the judges. Output the average score. Note: In case, more than two judges give the same score and it happens that score is the maximum or minimum then just eliminate two scores. For example, if the number of judges is 5 and all of them give 10 points each. Then the maximum and minimum score is 10. So the computation would be 10+10+10, this time. The output should be 10 because 30/3 is 10.
main() { char c; int i = 456; clrscr(); c = i; printf("%d", c); } a. 456 b. -456 c. random number d. none of the above
main() { int i=4,j=7; j = j || i++ && printf("YOU CAN"); printf("%d %d", i, j); }
Write out a function that prints out all the permutations of a string. For example, abc would give you abc, acb, bac, bca, cab, cba. You can assume that all the characters will be unique.
5 Answers IITR, Microsoft, Nike,
main(){ int a= 0;int b = 20;char x =1;char y =10; if(a,b,x,y) printf("hello"); }