Software Architect Questions


Q:

What is the Standard Template Library?

Answer

A library of container templates approved by the ANSI committee for inclusion in the standard C++ specification. A programmer who then launches into a discussion of the generic programming model, iterators, allocators, algorithms, and such, has a higher than average understanding of the new technology that STL brings to C++ programming

Report Error

View answer Workspace Report Error Discuss

Subject: C++ - Technology
Job Role: Software Architect

0 1812
Q:

main()

{

char *p; p = "Hello";

printf ("%cn", *&*p);

}

A) H B) Hello
C) Compilation error D) H E L L O
 
Answer & Explanation Answer: A) H

Explanation:

* is a dereference operator & is a reference operator. They can be applied any number of times provided it is meaningful. Here p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again & references it to an address and * dereferences it to the value H

Report Error

View Answer Workspace Report Error Discuss

Filed Under: Programming
Job Role: Software Architect

2 1590
Q:

There are eight poets, namely, A, B, C, D, E, F, G and H in respect of whom questions are being asked in the examination. The first four are ancient poets and the last four are modern poets. The question on ancient and modern poets is being asked in alternate years. Those who like H also like G, those who like D like C also. The examiner who sets question is not likely to ask question on D because he has written an article on him. But he likes D. Last year a question was asked on F. Considering these facts, on whom the question is most likely to be asked this year ?

Answer

Answer : C


Explanation : 


Since the examiner likes D, it means he must like C also, since the question states that those who like D like C also.


Since last year a question was asked on F, who is a modern poet, this year a question will be asked on an ancient poet which means A,B,C or D


Now the examiner is not likely to ask question on D because he has written an article on him. So he will ask the question on C since he likes C as well

Report Error

View answer Workspace Report Error Discuss

Subject: Non Verbal Reasoning Exam Prep: Bank Exams
Job Role: Software Architect

4 1277
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 Workspace Report Error Discuss

Filed Under: C++ - Technology
Job Role: Software Architect

0 928
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 Workspace Report Error Discuss

Filed Under: Java - Technology
Job Role: Software Architect

0 795