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

The book " The Vijay Mallya Story " has been written by _____

A) Vijay Mallya B) Gopinath
C) Giriprakash D) Siddharth Mallya
 
Answer & Explanation Answer: C) Giriprakash

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Bank Clerk , Bank PO

9 3123
Q:

India was elected as a President of General Assembly of the United Nations in 1953. Who occupied this office on behalf of India?

A) S. Radha Krishnan B) Gopalswamy Iyyengar
C) V.K. Krishna Menon D) Vijayalakshmi Pandit
 
Answer & Explanation Answer: D) Vijayalakshmi Pandit

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Organisations

9 3122
Q:

Water which is suitable for drinking is called _______________ water.

 

A) hygienic B) sparkling
C) potable D) sanitary
 
Answer & Explanation Answer: C) potable

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry
Exam Prep: Bank Exams

0 3122
Q:

Who has written the book ' The Famished Road '

A) Zolla Emile B) VS. Naipaul
C) Ben Okri D) Din Mani
 
Answer & Explanation Answer: C) Ben Okri

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

2 3121
Q:

The 90oEast Ridge lies in the _______Ocean

A) Pacific B) Atlantic
C) Indian D) Arctic
 
Answer & Explanation Answer: C) Indian

Explanation:

The 90oEast Ridge is aseismic, composed of volcanic rock it is about 1700 km long treading in a NNE direction into Bay of Bengal from the Indian Ocean.

Report Error

View Answer Report Error Discuss

Filed Under: World Geography
Exam Prep: AIEEE , Bank Exams , CAT

3 3121
Q:

Today __________ are seen as personal accessory - portable, powerful and simple to operate.

 

A) e-mail B) e-business  
C) e-content   D) Computers
 
Answer & Explanation Answer: D) Computers

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Computer
Exam Prep: Bank Exams

2 3121
Q:

For which one of the following snakes is the deit mainly composed of other snakes?

A) Krait B) Russel's viper
C) Rattlesnake D) King cobra
 
Answer & Explanation Answer: D) King cobra

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Animals and Birds

14 3119