Structure

1. Which of the following accesses a variable in a pointer to a structure ; #b ?

  •  b > var ,
  •  b – var :
  •  b . var ;
  •  b > var ;
Answer
 b > var ; 

2. In place is a structure in which another data type can be used in :

  •  Enum
  • Class
  • Float
  •  Int
Answer
Class 

3. What is self-referential structure?

  • The structure which has a pointer to itself
  •  The structure which contains another structure
  • The structure which contains a pointer
  • None of these
Answer
The structure which has a pointer to itself

4. What will happen when the structure is declared?

  • It will allocate the memory
  •  It will be declared and initialized
  •  It will not allocate any memory
  •  None of the method
Answer
It will not allocate any memory 

5. What is the other name of macros?

  • Executed directive
  • Link directive
  • Scripted directive
  • None of the method
Answer
Scripted directive

6. A constant with a name :

  • Name constant
  •  Char constant
  • Symbolic constant
  •  None of these
Answer
Symbolic constant 

7. The declaration of structure is also known as :

  • Structure signifier
  •  Structure specifier
  • Structure creator
  • None of the method
Answer
 Structure specifier

8. A name was given to a type via a type-name definition introduced by the keyword :

  • Typenam def
  • Typedef
  • Typenam
  • None of these
Answer
Typedef 

9. Which keyword is used to define the macros in C ++?

  •  Define
  • # Define
  • Macro
  • None of the method
Answer
# Define

10. The combination of having structures within an array is an :

  • Array of structure
  • Show no
  • Array
  • None of these
Answer
Array of structure

11. How many types of macros are there in CH?

  • 4
  • 3
  • 2
  •  1
Answer
2

12. In array element may be either :

  • Complex
  • Simple or complex
  • Poet
  •  Function
Answer
Simple or complex

13. Which symbol is used to declare the preprocessor detectives

  •  ^
  • *
  • s
  •  #
Answer
 #

14. What is the mandatory preprocessor directive for C ++?

  •  # Include < iostream >
  •  # Under Clostrcam Ve
  • # Define Ciostream >
  • None of the mention
Answer
# Include < iostream >

15. When a structure contains another structure, it is called :

  • Nested structure
  • Initialize structure
  • Structure assignment
  • Referencing structure
Answer
Structure assignment 

16. When accessing a structure member the identifier to the left of the dot operator is the name of :

  • The keyword struct
  •  A structure variable
  • A structure tag
  •  A structure member
Answer
A structure member

17. Which keyword is used for structure definition?

  • Structure def
  • Def struct
  • Struct
  • None of these
Answer
Struct

18. Can we initialize the structure’s elements in the structure itself?

  • No
  • Yes
  •   Depend on compiler
  •  None of the above
Answer
No 

19. Can we declare structure inside structure :

  •  No
  • Yes
  •  Depend on compiler
  • None of these
Answer
Yes

20. Can a structure contain a pointer to itself?

  •  Runtime Error
  • Compilation Error
  •  No
  •  Yes
Answer
Yes

21. What will be used when terminating the structure?

  • ,
  • ;
  • }
  • :
Answer
;

22. Aggregate data types built using other types is called as :

  • Structure
  •  Pointer
  •  Elements
  •  Function
Answer
Structure  

23. How many elements we can have in any structure?

  • 256
  • 1024
  • 128
  • None of these
Answer
256 

24. Can we typedef in declaring structure?

  •  No
  • Yes
  • Botha and b
  • None of these
Answer
Yes 

25. The data elements in structure are also known as :

  • Members
  •  Object
  • Data
  • None of these
Answer
Members 

26. Which of the following is a properly defined struct?

  • Struct a – struct { int a ; }
  • Struct a – Struct in a
  •  Struct a – struct { int a ; }
  • Struct { int a ; )
Answer
Struct a – struct { int a ; } 

27. A collection of variables referenced under one name is known as :

  • S – Style
  • C ++
  • C – Style
  • None of these
Answer
C – Style 

28. Which of the following accesses a variable in structure b?

  •  b > var ;
  •  b – var ,
  •  b . var :
  •  b > Var :
Answer
 b . var :

Leave a Comment