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 |
write a c program to Reverse a given string using string function and also without string function
can u give me the c codings for converting a string into the hexa decimal form......
Write a routine that prints out a 2-D array in spiral order
posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come
create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"
How to palindrom string in c language?
main() { char str1[] = {‘s’,’o’,’m’,’e’}; char str2[] = {‘s’,’o’,’m’,’e’,’\0’}; while (strcmp(str1,str2)) printf(“Strings are not equal\n”); }
PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } a. Runtime error. b. Runtime error. Access violation. c. Compile error. Illegal syntax d. None of the above
why the range of an unsigned integer is double almost than the signed integer.
Write a routine to implement the polymarker function
abcdedcba abc cba ab ba a a