Searching for "%"

Q:

How many ways are there to initialize int with a constant?

A) 1 B) 2
C) 3 D) 4
 
Answer & Explanation Answer: B) 2

Explanation:

There are two formats for initializers in C++ as shown in the example that follows. The first format uses the traditional C notation. The second format uses constructor notation.

int foo = 123;

 

int bar (123);

Report Error

View Answer Report Error Discuss

Filed Under: C++
Job Role: Software Architect

Q:

Which kind of inheritance is not supported directly through classes in java?

A) Multilevel B) Multiple
C) Single D) Hirarcheal
 
Answer & Explanation Answer: B) Multiple

Explanation:

Multiple inheritance is not supported directly but it is achieved through the concept of Interface

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: Software Architect

Q:

What do you mean by inline function?

Answer

An inline function is a function that is expanded inline when invoked.ie. the compiler replaces the function call with the corresponding function code. An inline function is a function that is expanded in line when it is invoked. That is the compiler replaces the function call with the corresponding function code (similar to macro)

Report Error

View answer Workspace Report Error Discuss

Subject: C++
Job Role: Software Architect

Q:

What do you mean by reference variable in c++?

Answer

A reference variable provides an alias to a previously defined variable.


Data type & reference-name = variable name

Report Error

View answer Workspace Report Error Discuss

Subject: C++
Job Role: Software Architect

Q:

Which among the following are not the c++ tokens

A) Identifiers B) keywords
C) Strings D) None
 
Answer & Explanation Answer: D) None

Explanation:

All the above listed options are c++ tokens .They  include:

             - keywords

             - Identifiers

             - Constants

             - Strings

             - operators

Report Error

View Answer Report Error Discuss

Filed Under: C++
Exam Prep: GATE

Q:

Which among the following is a scope resolution operator?

A) : B) ::
C) :? D) None
 
Answer & Explanation Answer: B) ::

Explanation:

:: is the scope resolution operator

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: Software Architect

Q:

An equilateral triangle is described on the diagonal of a square. What is the ratio of the area of the triangle to that of the square?

A) 1:2 B) 1:3
C) 2:3 D) 3^(1/2) :2
 
Answer & Explanation Answer: D) 3^(1/2) :2

Explanation:

area of a square = a² sq cm

 

length of the diagonal = 2a cm

 

area of equilateral triangle with side  2a= 34*2a2
required ratio = 34*2a2:a2=3:2

Report Error

View Answer Report Error Discuss

Filed Under: Area
Exam Prep: Bank Exams
Job Role: Bank PO

Q:

If the area of a square with side a s equal to the area of a triangle with base a, then the altitude of the triangle is

A) a B) 2a
C) 5a D) 3a
 
Answer & Explanation Answer: B) 2a

Explanation:

Area of a square with side a = a² sq unts

Area of a triangle with base a = (1/2) * a * h sq.unts

a² =1/2 *a *h

=> h = 2a

altitude of the triangle is 2a

Report Error

View Answer Report Error Discuss

Filed Under: Area
Exam Prep: Bank Exams
Job Role: Bank PO