info@avatto.com
+91-9920808017
11. Consider the following declaration. struct addr { char city [10]; char street [20]; int pincode; }; struct { char name[20]; int sex; struct addr locate; } criminal, *kd * &criminal; The third character in the criminal name can be accessed by
criminal.name [2]
kd —> name [2]
((*kd).name) [2]
All of these
Your email address will not be published. Required fields are marked *
Report
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Comment
12. Consider the following declaration. struct addr { char city [10]; char street [20]; int pincode; }; struct { char name[20]; int sex; struct addr locate; } criminal, *kd * &criminal; *(kd —> name + 2) can be used instead of
* (criminal .name + 2)
*((*kd) .name + 2)
Both (A) & (B)
either (A) or (B), but not (C)
13. Assuming that bit-fields are accommodated from right to left and word size is 16-bits Consider the declaration static struct { unsigned a : 5; unsigned b : 5; unsigned c : 5; unsigned d : 5; } v = (1, 2, 3, 4); information about d will be in the
first word
second word
in both words
none of the above
14. Assuming that bit-fields are accommodated from right to left and word size is 16-bits Consider the declaration static struct { unsigned a : 5; unsigned b : 5; unsigned c : 5; unsigned d : 5; } v = (1, 2, 3, 4); If the declaration unsigned c : 5; is replaced by unsigned : 6; then,
it results in a syntax error
it is meaningless
the compiler will give a new name for the field, which can be used in the program
15. Assuming that bit-fields are accommodated from right to left and word size is 16-bits Consider the declaration static struct { &emsp: unsigned a : 5; &emsp: unsigned b : 5; &emsp: unsigned c : 5; &emsp: unsigned d : 5; &emsp: } v = (1, 2, 3, 4); Consider the declaration struct wer { &emsp: unsigned a : 5; &emsp: unsigned : 0; &emsp: unsigned b : 3; &emsp: unsigned : 0; &emsp: unsigned c : 2 ; &emsp: unsigned : 0 ; &emsp: } v; The storage needed for v is
1 word
2 words
3 words
4 words
Login with Facebook
Login with Google
Forgot your password?
Lost your password? Please enter your email address. You will receive mail with link to set new password.
Back to login