main()

{

char c;

int i = 456;

clrscr();

c = i;

printf("%d", c);

}

a. 456

b. -456

c. random number

d. none of the above

Answers were Sorted based on User's Feedback



main() { char c; int i = 456; clrscr(); c = i; printf("%d"..

Answer / guest

d) -56

Is This Answer Correct ?    23 Yes 5 No

main() { char c; int i = 456; clrscr(); c = i; printf("%d"..

Answer / satya

ans: -56
explanation:
it mainly focus on integer range
it will prints the output like this
for 1=1
2=2....127=-127,
128=-128,
129=-127....256=0;
similarly
456 means 256+256=512=0;
456-512=-56

Is This Answer Correct ?    10 Yes 2 No

main() { char c; int i = 456; clrscr(); c = i; printf("%d"..

Answer / karthi

d.none of the above

Is This Answer Correct ?    8 Yes 2 No

Post New Answer

More C Code Interview Questions

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

3 Answers   HCL,


main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }

1 Answers  


main() { int *j; { int i=10; j=&i; } printf("%d",*j); }

9 Answers   HCL, Wipro,


How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)

4 Answers   HCL,


main() { int i=3; switch(i) { default:printf("zero"); case 1: printf("one"); break; case 2:printf("two"); break; case 3: printf("three"); break; } }

1 Answers  






How we print the table of 3 using for loop in c programing?

7 Answers  


main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }

2 Answers  


void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }

1 Answers  


main() { int a[10]; printf("%d",*a+1-*a+3); }

1 Answers  


Find the largest number in a binary tree

7 Answers   Infosys,


write a c program to Create a registration form application by taking the details like username, address, phone number, email along with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 5 users and display the details. In place of password display “****”. (Use Structures).

0 Answers   CDAC, College School Exams Tests,


main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }

29 Answers   IBM, TCS, UGC NET, Wipro,


Categories