main()

{

printf("%x",-1<<4);

}

Answers were Sorted based on User's Feedback



main() { printf("%x",-1<<4); }..

Answer / susie

Answer :

fff0

Explanation :

-1 is internally represented as all 1's. When
left shifted four times the least significant 4 bits are
filled with 0's.The %x format specifier specifies that the
integer value be printed as a hexadecimal value.

Is This Answer Correct ?    119 Yes 22 No

main() { printf("%x",-1<<4); }..

Answer / sourab

thts ans is ture 4 16 bit compiler ,for 32 bit ans is fffffff0.

Is This Answer Correct ?    40 Yes 9 No

main() { printf("%x",-1<<4); }..

Answer / aruna

-16

Is This Answer Correct ?    4 Yes 15 No

Post New Answer

More C Code Interview Questions

How to return multiple values from a function?

7 Answers  


Cluster head selection in Wireless Sensor Network using C programming language.

0 Answers  


Design an implement of the inputs functions for event mode

0 Answers   Wipro,


main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }

2 Answers  


main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above

3 Answers   HCL,






write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"

2 Answers  


void main() { static int i; while(i<=10) (i>2)?i++:i--; printf(ā€œ%dā€, i); }

2 Answers  


what is brs test reply me email me kashifabbas514@gmail.com

0 Answers  


String copy logic in one line.

11 Answers   Microsoft, NetApp,


A program that will create a movie seat reservation. The program will display the summary seats and its status. The user will be ask what seat no. to be reserved, then it will go back again to the summary to display the updated seat status. If the seat no. is already reserved then it will prompt an error message. And also if the input seat no is out of range then it will also prompt an error message. The program is continuously running. Termination of the program will depends on how the programmer will apply. Sample output: Movie Seats Reservation Summary of Seats: Seat 1: Available Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 6 The Seat no. is out of range! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 The Seat no. is already reserved! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 0 GoodBye... Thank You!!!

0 Answers  


Finding a number multiplication of 8 with out using arithmetic operator

8 Answers   Eyeball, NetApp,


main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above

4 Answers   HCL, LG,


Categories