Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q - Choose the correct answer for the following MCO I The data elements in struc

ID: 3740119 • Letter: Q

Question

Q - Choose the correct answer for the following

MCO I The data elements in structure are also known as wha? a objects b members cl data di none od the mentioned 2. What will be used when terminating a structure? d) . What will happen when the structure is declared? a) it will not allocate any memory b) it will allocune the memory c it will be declared and initialixed d) none od the mentioned 4. The declaration of structure is also called as a) structre creator b) structre signifier c structure specifier d none of the mentioned 5. Which of the following is a properly defineds a struct [imt a) b) struct a struct (int a) c) struct a struct int a d) struct a struct (im a R ABDULLAH LGAMMAL Beeha Univesily Benha Faculty of Engineering Electrical Engineering Departmen Frwt year Elecl Department 2semester-Spring 2018 Compater ProgramminEL124 6. Which of the following accesses a variable in structure b? a) b-var b) b.var c) b-var d) bovar Which of the following are themselves a collection of different data types? a) String b) Structure c) Char di All of the mentioned 8. h operutor connects the structure name to its member name? Both (b) and . Which of the following cannot be a structure member? a) Another structure b) Function c) Aray di Noee of the mentioned 10. Which of the following structure will throw an e a) struct tempt Is bi stract tempt maino truet temps; c) struct temp s ruct temmp d) None of the mentioned

Explanation / Answer

ANSWER :

1. Data in structure are known as members.

Ans : b) members

2. semicolon(;) is used to terminate a structure.
Ex :
struct tagname{
datatype member1;
datatype member2;
----------------
};

Ans : c) ;

3. Declaration of structure template does not reserve any space in
memory for the members; space is reserved only when variables of this
structure type are declared.

Ans : a) it will not declare any memory

4. Declaration of a sturucture is also called structure specifier.

Ans : c) structure specifier

5. format of structure declaration is :
struct tagname{
datatype member1;
datatype member2;
----------------
};

Ans : d) struct a_struct{int a};

6. format of accessing a structure member is :
structvariable.member

Ans : b) b.var;

7. Strucute is used to store heterogenous data.

Ans : b) Structure

8. format of accessing a structure member is :
structvariable.member
dot(.) operator is used to connect structure name to its member.

Ans : b) .

9. Array contain similar type of data it cannot be a structure.

Ans : c) Array

10.
format of structure variable:
struct tagname{
datatype member1;
datatype member2;
----------------
}var1,var2;

Ans c) struct temp s;
struct temp{}
main(){}