What is o/p for the following?struct tr{int i=9;char a='l';};&struct ty{int i:6;char c:'m';};

Showing Answers 1 - 2 of 2 Answers

Richa Yadav

  • Mar 12th, 2006
 

it gives error, becoz u can not iinitialize variable within the structure.

Prashanth

  • Mar 18th, 2006
 

the second is a bit vector.. 'i' will be allocated 6 bits and 'c' the ascii value of 'm' number of bits

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.