(A) looped
(B) nested
(C) overloaded
(D) none of the given options.
Category: Introduction to Programming Mcqs
Introduction to Programming Mcqs for Screening tests, Interviews, Viva and Other competitive exams. Programming Mcqs section will help users to prepare mcqs of programming languages for various exams. Aspirants of Lecturer Computer Science, SST Computer Science, Subject Specialist Computer Science, Data Entry operator, Computer Programmer, Computer Operator, Software engineer and all other Competitive Exams can prepare their computer programming portion from here.
The static data members of a class can be accessed by __.
(A) only class
(B) only objects
(C) both class and objects
(D) none of given options
If we want to use stream insertion and extraction operators with __ then we have to overload these operators.
(A) int, float, double
(B) objects of class
(C) int, float, object
(D) int, char, float
The endl and flush are __.
(A) Functions
(B) Operators
(C) Manipulators
(D) Objects
To perform manipulation with input/output, we have to include __ header file.
(A) iostream.h
(B) stdlib.h
(C) iomanip.h
(D) fstream.h
Like member functions, __ can also access the private data members of a class.
(A) Non-member functions
(B) Friend functions
(C) Any function outside class
(D) None of the given options
The prototype of friend functions must be written __ the class and its definition must be written __.
(A) inside, inside the class
(B) inside, outside the class
(C) outside, inside the class
(D) outside, outside the class
Which of the following is the correct C++ syntax to allocate space dynamically for an array of 10 int?
(A) new int(10)
(B) new int[10]
(C) int new(10)
(D) int new[10]