IBPS IT OFFICER MCQ – 74

IT OFFICER

1. Memory allocation using malloc() is done in?
a) Static area
b) Stack area
c) Heap area
d) Both b & c

Click here to View Answer
Answer c) Heap area

2. Which one is used during memory deallocation in C?
a) remove(p);
b) delete(p);
c) free(p);
d) terminate(p);

Click here to View Answer
Answer c) free(p);

3. In which of the following we cannot overload the function?
a) Return function
b) Caller
c) Called function
d) None of the mentioned

Click here to View Answer
Answer a) Return function

4. Function overloading is also similar to which of the following?
a) operator overloading
b) constructor overloading
c) destructor overloading
d) none of the mentioned

Click here to View Answer
Answer b) constructor overloading

5. What are the advantages of passing arguments by reference?
a) Changes to parameter values within the function also affect the original arguments
b) There is need to copy parameter values (i.e. less memory used)
c) There is no need to call constructors for parameters (i.e. faster)
d) All of the mentioned

Click here to View Answer
Answer d) All of the mentioned

6. What will happen while using pass by reference?
a) The values of those variables are passed to the function so that it can manipulate them
b) The location of variable in memory is passed to the function so that it can use the same memory area for its processing
c) The function declaration should contain ampersand (& in its type declaration)
d) All of the mentioned

Click here to View Answer
Answer b) The location of variable in memory is passed to the function so that it can use the same memory area for its processing

7. Where are standard C libraries defined in C++?
a) Container
b) std namespace
c) list
d) None of the mentioned

Click here to View Answer
Answer b) std namespace

8. How many elements does a floating point number is composed of?
a) 1
b) 2
c) 3
d) 4

Click here to View Answer
Answer d) 4

9. How does the limits.h header file can be represented in C++?
a) limits
b) limit
c) climits
d) None of the mentioned

Click here to View Answer
Answer c) climits

10. Pick out the correct syntax of the header file that can be used with C++?
a) #include <float>
b) #include <float.h>
c) Both a & b
d) None of the mentioned

Click here to View Answer
Answer b) #include <float.h>

Check out our latest videos on youtube