C Programming and Technical

Q. what is nested structure?

A. A structure is a collection of one or more variables, possibly of different data types, grouped together under a single name for convenient handling. Structures can contain other structures as members; in other words, structures can nest

Read Solution (Total 0)

C Other Question

Q. void main(){
int x=5,y=10,z=15,val;
val=sum(x,(y=0,z=0,y),z);
clrscr();
printf("%d",val);
getch();
}
sum(int x,int y,int z){
return x+y+z;
}

A. 20

Explanation: In the above program comma after Y=0 &Z=0 are behaving as operator
Q. What is slack byte in structure?

A. To store any type of data in structure there is minimum fixed byte which must be reserved by memory. This minimum byte is known as word boundary. Word boundary depends upon machine. TURBO C is based on 8086 microprocessor which has two byte word boundary. So any data type reserves at least two byte space.