Void main is not allowed by the C standard (nor the C standard) and should not even compile. The int value that main returns is usually the value that will be passed back to the operating system. 0 traditionally indicates that the program was successful.
- Void Main Not Working Dev C++ Version
- Void Main Not Working Dev C 2b 2b 3
- Void Main Not Working Dev C++ Update
- You to compile a C program that includes some features of C, in this course we will concentrate on C programming language. A program written in pure C language may be compiled and run using other C compilers, like Turbo C etc. Dev-C interface When you click on the Dev-C icon on your desktop, the program window opens (Figure 1).
- I want to change cursor position in my C program. As you know, C does not have any command to do this. By I think, one of the h files can be used for this purpose. My Bloodshed compiler has lots of '.h' files. But I don't know how to use any of them. Even you tell me an header file name, it.
- C++ Basics
- C++ Object Oriented
- C++ Advanced
- C++ Useful Resources
- Selected Reading
This section presents you various set of Mock Tests related to C++ Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - The default access specifer for the class members is
Answer : B
Explaination
If a member/s appear in the class with following no access specifier, the default is private.
Q 2 - A trigraph character begins with
Answer : C
Explaination
Few characters have alternative representation and start with ??. Eg. Fro [ equivalent is ??(
Q 3 - C++ does not supports the following
Answer : D
Explaination
C++ supports all the forms of inheritance.
Q 4 - One of the following is true for an inline function.
Answer : A
Explaination
As inline function gets expanded at the line of call like a macro it executes faster.
Q 5 - Choose the pure virtual function definition from the following.
Answer : D
Explaination
A pure virtual function cannot have a definition.
Q 6 - Abstract class is __
Answer : B
Explaination
It is sufficient to have one pure virtual function in the class to make it as an abstract class.
Q 7 - What is the output of the following program?
Answer : B
Explaination
Only the class member variables constitutes as the size of the class or its object.
Q 8 - What is the output of the following program?
Answer : A
Explaination
The static member variable ‘x’ shares common memory among all the objects created for the class.
Q 9 - A constructor can be virtual.
Answer : B
Explaination
The purpose of the constructor cannot be overridden in the derived class hence constructor cannot be a virtual.
Q 10 - Choose the operator which cannot be overloaded.
Answer : C
Explaination
Scope resolution (::) is not permitted to be overloaded.
Q 11 - Which operator is required to be overloaded as member function only?
Answer : D
Explaination
Overloaded assignment operator does the job similar to copy constructor and is required to be overloaded as member function of the class.
Q 12 - Which of the following is not the keyword in C++?
Answer : C
Explaination
Void Main Not Working Dev C++ Version
All the rest are valid keywords of C++.
Q 13 - What is the output of the following program?
Answer : B
Explaination
i=i, is assigning member variable to itself.
Q 14 - By default the members of the structure are
Answer : C
Explaination
If no access specifiers are specified for structure variables/functions, then the default is considered as public.
Q 15 - From the below class choose the proper definition of the member function f().
Q 16 - Choose the respective delete operator usage for the expression ‘ptr=new int[100]’.
Q 17 - ‘cin’ is an __
Answer : B
Explaination
It’s an object of istream class.
Q 18 - The operator used to access member function of a structure using its object.
Answer : A
Explaination
Just the way we use dot (.) operator to access members of the class, in similar it is used to access the members of the structure too.
Q 19 - A user defined header file is included by following statement in general.
Answer : A
Explaination
With the syntax as in (a) the compiler first looks for the file in the present working directory and then in the default include path if not found.
Q 20 - Which data type can be used to hold a wide character in C++?
Answer : C
Explaination
wchar_t is the data type using which we can hold Unicode characters.
Q 21 - Which is the storage specifier used to modify the member variable even though the class object is a constant object?
Answer : D
Explaination
mutable is storage specifier introduced in C++ which is not available in C. A class member declared with mutable is modifiable though the object is constant.
Q 22 - The following operator can be used to calculate the value of one number raised to another.
Answer : D
Explaination
There is no such operator in C/C++.
Q 23 - Pick up the valid declaration for overloading ++ in postfix form where T is the class name.
Answer : B
Explaination
The parameter int is just to signify that it is the postfix form overloaded. Shouldn’t return reference as per its original behavior.
Q 24 - We can have varying number of arguments for the overloaded form of () operator.
Void Main Not Working Dev C 2b 2b 3
Q 25 - Operators sizeof and ?:
Answer : B
Explaination
Void Main Not Working Dev C++ Update
Both the mentioned operators cannot be overloaded.
Question Number | Answer Key |
---|---|
1 | B |
2 | C |
3 | D |
4 | A |
5 | D |
6 | B |
7 | B |
8 | A |
9 | B |
10 | C |
11 | D |
12 | C |
13 | B |
14 | C |
15 | A |
16 | C |
17 | B |
18 | A |
19 | A |
20 | C |
21 | D |
22 | D |
23 | B |
24 | A |
25 | B |