What Is The Correct Syntax To Declare An Array in C
What Is The Correct Syntax To Declare An Array in C
A. int arrayName[size];
B. array arrayName[size];
C. arrayName[size];
D. int[size] arrayName;
Answer: A
A. class
B. struct
C. typedef
D. using
Answer: A
A. int
B. float
C. char
D. string
Answer: D
Answer: A
Which operator is used to access the member functions and variables of a class in C++?
A. *
B. .
C. ::
D. ->
Answer: D
Copy code
A. 10
B. 11
C. Compiler error
D. Undefined behavior
Answer: A
A. while loop
B. do-while loop
C. for loop
D. if-else statement
Answer: B
Copy code
A. 10
B. 11
C. Compiler error
D. Undefined behavior
Answer: B
A. new operator
B. malloc function
C. calloc function
D. realloc function
Answer: A
Copy code
A. 1
B. 2
C. 5
D. Compiler error
Answer: A
eisha tariq
more
A. method
B. subroutine
C. function
D. procedure
Answer: C
Copy code
A. 0
B. 1
C. Compiler error
D. Undefined behavior
Answer: A
A. break
B. continue
C. return
D. exit
Answer: A
What is the output of the following code?
Copy code
int num = 5;
A. 4 5
B. 5 5
C. 4 6
D. 5 6
Answer: A
A. using
B. typedef
C. include
D. const
Answer: C
Copy code
A. 1
B. 2
C. 3
D. 4
Answer: C
A. var
B. constant
C. const
D. readonly
Answer: C
Copy code
A. true
B. false
C. Compiler error
D. Undefined behavior
Answer: A
A. iostream
B. string
C. vector
D. algorithm
Answer: A
What is the output of the following code?
Copy code
A. 0
B. 1
C. Compiler error
D. Undefined behavior
Answer: D
eisha tariq
more 30
A. repeat-until loop
B. while loop
C. for-each loop
Answer: B
Copy code
B. 9
C. Compiler error
D. Undefined behavior
Answer: A
Which of the following is a type of function in C++ that does not return a value?
A. void function
B. value-returning function
C. constructor function
D. destructor function
Answer: A
Copy code
A. 0
B. 1
C. Compiler error
D. Undefined behavior
Answer: B
A. void constructor()
B. constructor()
C. class constructor()
D. ClassName()
Answer: D
Copy code
A. 0
B. 1
C. Compiler error
D. Undefined behavior
Answer: B
A. varType* ptrName;
B. varType ptrName*;
C. ptrName* varType;
D. ptrName varType*;
Answer: A
Copy code
A. 1
B. 5
C. Compiler error
D. Undefined behavior
Answer: A
A. void function
B. value-returning function
C. constructor function
D. destructor function
Answer: B
Copy code
A. 0
B. 1
C. Compiler error
D. Undefined behavior
Answer: A