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 3606
Q:

Who is author of the book 'Preparing for the Twenty First Century '

A) V.S.Naipaul B) John Ruskin
C) Paul Kennedy D) Henry Kissinger
 
Answer & Explanation Answer: C) Paul Kennedy

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

1 3604
Q:

Who is the First Indian to win a medal in badminton at the Olympics ?

Answer

Saina Nehwal

Report Error

View answer Workspace Report Error Discuss

16 3604
Q:

Point out which from the following is NOT a right enumerated in the Constitution of India but has been articulated by the Supreme Court to be a Fundamental Right

A) Right to privacy B) Certiorari
C) Abolition of untouchability D) Right to form association or Union
 
Answer & Explanation Answer: A) Right to privacy

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

7 3604
Q:

_______ has hailed ARJUN as "among the best three Main Battle Tanks" in the world 

A) Gen Shankar Roy Chowdhury B) VS Arunachalam
C) Dr APJ Abdul Kalam D) Dr MGK Menon
 
Answer & Explanation Answer: C) Dr APJ Abdul Kalam

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Awareness

0 3604
Q:

Nayveli Power Project is a ________ Power Project

A) Hydro- electric B) Nuclear
C) Thermal D) Non- conventional
 
Answer & Explanation Answer: C) Thermal

Explanation:

Electricity generated from coal and oil is termed as 'Thermal Power'.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

5 3603
Q:

'Barren Island' which is the only active volcano in India is situated in?

A) Rajasthan B) Andaman-Nicobar
C) Chattisgarh D) Lakshadweep
 
Answer & Explanation Answer: B) Andaman-Nicobar

Explanation:

The only active volcano in India is situated in Andaman-Nicobar islands.

Report Error

View Answer Report Error Discuss

2 3603
Q:

Of the three ways to create an Oracle database, which one is the easiest and most recommended?

A) Using the Oracle Database Configuration Assistant. B) Using the Oracle-supplied database creation procedures.
C) Using the SQL CREATE DATABASE command. D) None of the above is correct.
 
Answer & Explanation Answer: A) Using the Oracle Database Configuration Assistant.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Database

1 3603