Questions

Q:

What will be output of following c code?

void main()
{
struct bitfield
{
unsigned a:5;
unsigned c:5;
unsigned b:6;

}bit;
char *p;
struct bitfield *ptr,bit1={1,3,3};
p=&bit1;
p++;
clrscr();
printf("%d",*p);
getch();
}

Answer

Output: 12

Explanation:
Binary value of a=1 is 00001 (in 5 bit)
Binary value of b=3 is 00011 (in 5 bit)
Binary value of c=3 is 000011 (in 6 bit)

In memory it is represented as:
Let address of bit1 is 500 which initialize to char pointer p. Since can is one byte data type so p++ will be 501. *p means content of memory location 501 which is (00001100) and its binary equivalent is 12. Hence output is 12.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 3146
Q:

Which of the following pairs is NOT correctly matched?

 

A) Etna : Italy B) Fujiyama : Japan
C) Popa : Myanmar D) Krakatau : Malaysia
 
Answer & Explanation Answer: D) Krakatau : Malaysia

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Geography
Exam Prep: Bank Exams

0 3144
Q:

The element common to all Acids is

A) Nitrogen B) Oxygen
C) Hydrogen D) Carbon
 
Answer & Explanation Answer: C) Hydrogen

Explanation:

Hydrogen is the common element to all Acids. But every element which contains Hydrogen is not an Acid. Most of the acids also contain Oxygen.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , GATE
Job Role: Analyst , Bank Clerk , Bank PO

4 3143
Q:

Circuit breaker usually operate under

A) after D. C. component has ceased B) transient state of short-circuit current
C) sub-transient state of short-circuit current D) steady state of short-circuit current
 
Answer & Explanation Answer: B) transient state of short-circuit current

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

4 3143
Q:

 The ODBC Level 1 API contains which of the following functions?

A) Browse possible connections and data sources only B) Connect to data sources with driver-specific information only
C) Process a scrollable cursor only D) Both 1 and 3 above are in the OBDC Level 1 API.
 
Answer & Explanation Answer: B) Connect to data sources with driver-specific information only

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

1 3143
Q:

The first Earth sumit was held at

A) Buenos Aires B) Rio de janeiro
C) Dar-es-Salam D) None of these
 
Answer & Explanation Answer: B) Rio de janeiro

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Organisations

0 3142
Q:

For How many years have the dinosaurs been extinct?

A) About 25 million years B) About 65 million years
C) About 100 million years D) About 135 million years
 
Answer & Explanation Answer: B) About 65 million years

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Animals and Birds

11 3142
Q:

Who among the following was the 1st Speaker of the Lok Sabha?

A) M.A. Ayyangar B) N. Sanjiva Reddy
C) Ganesh Vasudev Mavalankar D) Sardar Hukam Singh
 
Answer & Explanation Answer: C) Ganesh Vasudev Mavalankar

Explanation:

Ganesh Vasudev Mavalankar popularly known as Dadasaheb was an independence activist, the President of the Central Legislative Assembly, then Speaker of the Constituent Assembly of India, and later the first Speaker of the Lok Sabha, the lower house of the Parliament of India from 15 May 1952 – 27 February 1956.

the_1st_Speaker_of_the_Lok_Sabha1559041668.jpg image

Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

4 3141