Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

Given a method in a protected class, what access modifier do youuse to restrict access to that method to only the other members of thesame class?

A. final
B. static
C. private
D. protected
Answer» D. protected
2.

  public class Test { }What is the prototype of the default constructor?

A. Test( )
B. Test(void)
C. public Test( )
D. publicTest(void)
Answer» D. publicTest(void)
3.

  Which one of the following will declare an array and initialize it withfive numbers?

A. Array a = newArray(5);
B. int [] a ={23,22,21,20,19};
C. int a [] = newint[5];
D. int [5] array;
Answer» C. int a [] = newint[5];
4.

To ensure that every object in the array receives a destructor call,always delete memory allocated as an array with operator __________

A. destructor
B. delete
C. delete[]
D. kill[]
Answer» D. kill[]
5.

A constructor that accepts __________ parameters is called thedefault constructor.

A. one
B. two
C. no
D. three
Answer» D. three
6.

Which of the following header file includes definition of cin andcout?

A. istream.h
B. ostream.h
C. iomanip.h
D. iostream.h
Answer» E.
7.

Which of the following is not a type of inheritance?

A. Multiple
B. Multilevel
C. Distributive
D. Hierarchical
Answer» D. Hierarchical
8.

Which of the following ways are legal to access a class data memberusing this pointer?

A. this->x
B. this.x
C. *this.x
D. *this-x
Answer» B. this.x
9.

Which of the following concepts is used to implement late binding?

A. Virtualfunction
B. Operatorfunction
C. Const function
D. Staticfunction
Answer» B. Operatorfunction
10.

Which one of the following options is correct about the statementgiven below? The compiler checks the type of reference in the objectand not the type of object.

A. Inheritance
B. Polymorphism
C. Abstraction
D. Encapsulation
Answer» C. Abstraction
11.

Which of the following cannot be friend?

A. Function
B. Class
C. Object
D. Operatorfunction
Answer» D. Operatorfunction
12.

Which of the following concepts means determining at runtimewhat method to invoke?

A. Data hiding
B. DynamicTyping
C. Dynamicbinding
D. Dynamicloading
Answer» D. Dynamicloading
13.

Which of the following is not the member of class?

A. Static function
B. Friendfunction
C. Const function
D. Virtualfunction
Answer» C. Const function
14.

Which of the following type of class allows only one object of it tobe created?

A. Virtual class
B. Abstract class
C. Singleton class
D. Friend class
Answer» D. Friend class
15.

Which of the following operations can be performed on the file"NOTES.TXT" using the below code?FILE *fp;fp = fopen("NOTES.TXT", "r+");

A. Reading
B. Writing
C. Appending
D. Read andWrite
Answer» E.
16.

Which of the following cannot be checked in a switch-casestatement?

A. Character
B. Integer
C. Float
D. enum
Answer» D. enum
17.

What is stderr ?

A. standard error
B. standard errortypes
C. standard errorstreams
D. standarderror
Answer» D. standarderror
18.

Which header file should be included to use functions like malloc()and calloc()?

A. memory.h
B. stdlib.h
C. string.h
D. dos.h
Answer» C. string.h
19.

What will you do to treat the constant 3.14 as a long double?

A. use 3.14LD
B. use 3.14L
C. use 3.14DL
D. use 3.14LF
Answer» C. use 3.14DL
20.

The loop for,while,do-while are used in?

A. Fortran 77
B. Pascal
C. C
D. none of theabove
Answer» D. none of theabove
21.

  Which of the following characters is allowed in variable names in C?

A. comma
B. dot
C. blank
D. Which of thefollowing is nota key word inC?
Answer» E.
22.

Which of the following is not a key word in C language?

A. for
B. pop
C. if
D. union
Answer» C. if
23.

Which of the is following can not be used as a variable name in C?

A. else
B. coal
C. ram
D. vendy
Answer» B. coal
24.

Which of the following is not a valid variable?

A. p_ce1
B. 1 p_ce
C. p1_ce
D. p_ced
Answer» C. p1_ce
25.

  Which of the following is not a valid real constant in C language?

A. 426
B. 321.121
C. -621.231
D. 201.2314
Answer» B. 321.121
26.

Which of the following is not a valid integer constant in C?

A. 321
B. -162
C. -621.231
D. 1
Answer» D. 1
27.

Which operator in C is called a ternary operator?

A. if-then
B. ++
C. ?
D. ( )
Answer» D. ( )
28.

Which among the following is a unconditional control structure?

A. do-while
B. if-else
C. goto
D. for
Answer» D. for
29.

C supports how many basic looping constructs?

A. 2
B. 3
C. 4
D. 6
Answer» C. 4
30.

The printf() function returns which value when an errors occurs?

A. Positive value
B. Zero
C. Negativevalue
D. None of these
Answer» D. None of these
31.

Which pair of function below is used for single character I or O?

A. getchar() &putchar()
B. scanf() &printf()
C. Input () &output()
D. None of these
Answer» B. scanf() &printf()
32.

Can we override private virtual methods?

A. Yes
B. No
C. Both
D. None
Answer» C. Both
33.

Is it possible to change the value of a variable while debugging a C#application?

A. Yes
B. No
C. Both
D. None
Answer» B. No
34.

What is ENUM?

A. It is used todefineconstants
B. It is used todefine variables
C. It is used toinitializevariables
D. None
Answer» B. It is used todefine variables
35.

DSL is an example of a(n) connection?

A. network
B. wireless
C. slow
D. broadband
Answer» E.
36.

A hardware networking device used to connect two LANs or LANsegment?

A. Bridge
B. Router
C. Hub
D. Broad band
Answer» B. Router
37.

The amount of the data can be transferred across a communicationsmedia?

A. Base band
B. Band width
C. Network
D. None of these
Answer» C. Network
38.

A record is collection of?

A. Data
B. File
C. Database
D. None of these
Answer» C. Database
39.

Types of servers are?

A. Dedicated
B. Non-dedicated
C. Both a and b
D. None of these
Answer» D. None of these
40.

Linear topology is also called?

A. Star topology
B. Bus topology
C. Ring topology
D. Meshtopology
Answer» C. Ring topology
41.

  In which cable no electrical signal travels?

A. Fiber optics
B. UTP
C. STP
D. Coaxial cable
Answer» B. UTP
42.

Which of the following items is not a UTP cable?

A. CAT2
B. CAT3
C. CAT100
D. CAT5
Answer» D. CAT5
Previous Next