functions in c++

mcqspedia.com has 5 Question/Answers about Topic functions in c++

A function in C++ that does not return a value is declared with

A function in C++ that does not return a value is declared with
  • A. Empty return type
  • B. Void return type
  • C. Endl return type
  • D. Getchar return type
  • Correct Answer: Option B

Which function is known as standard library function?

Which function is known as standard library function?
  • A. maths
  • B. main
  • C. sqrt
  • D. void
  • Correct Answer: Option B

To declare identifiers for variables and functions of static storage class, which keywords are used?

To declare identifiers for variables and functions of static storage class, which keywords are used?
  • A. extern keyword
  • B. static keyword
  • C. global keyword
  • D. Both A and B
  • Correct Answer: Option D

A called function can return control to caller if

A called function can return control to caller if
  • A. The function does not return a value
  • B. If that function has no value in expression
  • C. If program ends successfully
  • D. All of them
  • Correct Answer: Option A

() parenthesis in a function call

() parenthesis in a function call
  • A. is actually an operator in C++
  • B. Causes function to be called
  • C. Causes syntax error
  • D. Both A and B
  • Correct Answer: Option D