Functions

 

1. A function cannot be defined inside –

  • Another function
  • A program
  • A class
  • None of these

2. Which C libram file declare functions for processing strings ?

  •  < Stdlib.h >
  •  < String.h >
  •  < time.h >
  •  < Stdio.h >

3. Not initializing a reference variable will cause :

  • Termination of program
  • Overloading
  • A Syntax error
  •  Nothing

4. Int & x ; this syntax is used when :

  •  X is passed by reference
  • X is declared outside the function
  • X is passed by value
  •  None of the above

Answer

X is passed by reference

5. Standard C library file < stdib.h ) is used for :

  • Declares data function
  • Declares time function
  • Declares a mathematical function
  • Declares a utility function

Answer

Declares a utility function

6. Iteration used a repetition structure whereas recursion uses :

  • Selection Structure
  • Controlling Structure
  •  Sorting Structure
  • All of these

Answer

Selection Structure

7. A function is invoked by a :

  • Operator call
  • An object call
  • Function call
  • None of these

8. Which C ++ function is used for finding absolute values?

9. Pre-defined function and other program elements are accessed through :

  •  Classes
  • Operator
  • Header files
  • All of these

10. In which circumstances recursion function is called?

  • For calling maths function
  •  To calling input and output stream
  • To solve a problem
  • All of the above

Answer

To solve a problem

11. Void function is also called as :

  • Subroutine
  • Procedure
  • Both a and b
  • Terminator

12. Which function is known as the standard library function?

13. Strand function is used for :

  •  Including the timestamps
  • Getting randomizing effect
  • Calling a maths function
  •  None of these

Answer

Getting randomizing effect

14. Like swap ( ) function if we want to change the value of the actual parameter we must call parameters :

15. INT – MAX Constant is defined in which header file?

16. Recursive alt is also known as

17. Which of the following is not a maths function

18. Function body is also referred as :

19. Default return type for every function is :

20. How many storage classes specifies are offered by C ++?

21. Which from following is not a storage class specifier in C++:

22. A function that needs no return value is called :

23. Modules in C ++ are called :

Leave a Comment

Your email address will not be published.