Programming :: All Aptitude Test ::

Hassan
1.What will be the output of the program?
A. Error
B. -11, 34
C. 11, 34
D. Error

2.Point out the error in the program?
A. Error: unknown pointer conversion
B. Error: cannot convert ptr const value
C. No error
D. Error: unknown pointer conversion

3.Point out the error in the program (in Turbo-C).
A. Error: unknown max in declaration/Constant expression required
B. Error: invalid array string
C. No error. It prints A A
D. Error: unknown max in declaration/Constant expression required

4.Point out the error in the program?
A. Error: RValue required
B. Error: cannot modify const object
C. Error: LValue required in strcpy
D. Error: RValue required

5.Point out the error in the program?
A. Error: cannot convert 'const char *' to 'char *'.
B. Error: Lvalue required
C. No error and No output
D. Error: cannot convert 'const char *' to 'char *'.

6.Point out the error in the program?
A. Error: unknown data type const int
B. Error: const variable have been initialised when declared.
C. Error: stack overflow in x
D. Error: unknown data type const int

7.Point out the error in the program?
A. Error: RValue required
B. Error: Lvalue required
C. Error: cannot convert from 'const int *' to 'int *const'
D. Error: RValue required

8.Point out the error in the program?
A. Error: cannot convert ptr const value
B. Error: unknown pointer conversion
C. No error
D. Error: cannot convert ptr const value

9.Point out the error in the program?
A. Error: RValue required
B. Error: Lvalue required
C. Error: fun() returns a pointer const character which cannot be modified
D. Error: RValue required

10.What will be the output of the program?
A. PakMcqs 1 7 11 0
B. 1
C. 4
D. PakMcqs 1 7 11 0

11.What will be the output of the program?
A. Apple 12
B. Boys 13
C. Cats 14
D. Apple 12

12.Point out the error in the program?
A. Error: fun() needs return type
B. Error: ptr Lvalue required
C. Error: Invalid declaration of fun(...)
D. Error: fun() needs return type

13.Point out the error if any in the following program (Turbo C)?
A. Error: unknown variable ptr
B. Error: Lvalue required for parameter
C. No error and print A a b c
D. Error: unknown variable ptr

14.Point out the error in the program?
A. Error: ptr has to be set at begining
B. Error: ptr must be type of va_list
C. Error: invalid access to list member
D. Error: ptr has to be set at begining

15.Point out the error in the program?
A. Error: invalid arguments in function display()
B. Error: too many parameters
C. Error: in va_start(ptr, s);
D. Error: invalid arguments in function display()

16.Point out the error in the program?
A. Error: invalid va_list declaration
B. Error: var c data type mismatch
C. No error
D. Error: invalid va_list declaration

17.Point out the error in the program?
A. Error: invalid function display() call
B. Error: invalid function show() call
C. No error
D. Error: invalid function display() call

18.Point out the error in the program?
A. Error: too many parameters
B. Error: invalid access to list member
C. Error: ptr must be type of va_list
D. Error: too many parameters

19.Which of the following type of class allows only one object of it to be created?
A. Friend class
B. Singleton class
C. Abstract class
D. Friend class

20.Which of the following is not a type of constructor?
A. Parameterized constructor
B. Default constructor
C. Friend constructor
D. Parameterized constructor

21.Which of the following statements is correct?
A. Pointer to base class cannot be created.
B. Pointer to derived class cannot be created.
C. Derived class pointer cannot point to base class.
D. Pointer to base class cannot be created.

22.Which of the following is not the member of class?
A. Virtual function
B. Const function
C. Friend function
D. Virtual function

23.Which of the following concepts means determining at runtime what method to invoke?
A. Data hiding
B. Dynamic Typing
C. Dynamic binding
D. Data hiding

24.Which of the following statement is correct?
A. A reference is stored in a binary tree.
B. A reference is stored in a queue.
C. A reference is stored on stack.
D. A reference is stored in a binary tree.

25.Which of the following statements is correct?
A. Only 1 is correct.
B. Only 2 is correct.
C. Both 1 and 2 are correct.
D. Only 1 is correct.

26.Functions can be declared to return a reference type. There are reasons to make such a declaration/Which of the following reasons are correct?
A. Only 1 is correct.
B. Only 2 is correct.
C. Both 1 and 2 are correct.
D. Only 1 is correct.

27.Which of the following statements is correct?
A. Only 1 is correct.
B. Only 2 is correct.
C. Both 1 and 2 are correct.
D. Only 1 is correct.

28.Which of the following statement is correct about the references?
A. A reference must always be initialized within functions.
B. A reference must always be initialized outside all functions.
C. A reference must always be initialized.
D. A reference must always be initialized within functions.

29.Which of the following statement is correct about the program given below?
A. The program will print the output 80 80.
B. The program will print the output 81 80.
C. The program will print the output 81 81.
D. The program will print the output 80 80.

30.Which of the following statement is correct about the program given below?
A. The program will print the output 80 80.
B. The program will print the output 81 80.
C. The program will print the output 81 81.
D. The program will print the output 80 80.


Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers