Welcome Guest | Sign in | Register

Home > C Programming > Structures > Questions and Answers

01. The statement which declares a structure variable called sample, defined from a structure of typestruct record, is
A. type sample : record; B. struct sample;
C. struct record sample; D. declare sample as type record;

Answer and Explanation

Answer: struct record sample;

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
02. The statment that assigns the value 10 to the field loop of the sample structure (which is of type struct record), is
A. loop =10 B. sample.loop=10
C. record.sample.loop=10 D. record.loop=10

Answer and Explanation

Answer: sample.loop=10

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
03. The statement that prints out (using printf) the value of the word array of the sample structure is
A. printf("%d", sample); B. printf("%s", word );
C. printf("%c", sample-word ); D. printf("%s", sample.word );

Answer and Explanation

Answer: printf("%s", sample.word );

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
04. The correct definition for a structure called birthdays, whose fields are a structure of type struct time called btime, and a structure of type struct date, called bdate, is
A. Structure 1
birthdays {
time btime;
date bdate;
};
B. Structure 2
struct birthdays {
struct time btime;
struct date bdate;
};
C. Structure 3
struct birthdays {
struct bdate date;
struct btime time;
};
D. None of these

Answer and Explanation

Answer: Structure 2
struct birthdays {
struct time btime;
struct date bdate;
};

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum



Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.