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

The average salinity of seawater is

A) 35% B) 3.5%
C) 3% D) 2.5%
 
Answer & Explanation Answer: B) 3.5%

Explanation:

Seawater or salt water is water from a sea or ocean.

On average, seawater in the world's oceans has a salinity of approximately 3.5% or 35 parts per thousand. This means that for every 1 litre (1000 mL) of seawater there are 35 grams of salts dissolved in it.

 

Hence, The average salinity of seawater is 3.5%.

Report Error

View Answer Report Error Discuss

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

5 3504
Q:

Who is the author of the book "The Alchemist"?

A) Agatha Christie B) Paulo Ceolho
C) Frankenstien D) None
 
Answer & Explanation Answer: B) Paulo Ceolho

Explanation:

Paulo Ceolho is the author of The Alchemist

Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors

2 3503
Q:

Cortisol is secreted by

A) Thyroid gland B) Pituitary gland
C) Adrenal gland D) Parathyroid gland
 
Answer & Explanation Answer: C) Adrenal gland

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

6 3503
Q:

Nissil granules occur in

A) Eosinophil B) Glial cell
C) Neuron D) Lymphocyte
 
Answer & Explanation Answer: C) Neuron

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

6 3502
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 3502
Q:

National Dairy Research Institute is located at

A) Ludhiana B) Karnal
C) Pantnagar D) Hyderabad
 
Answer & Explanation Answer: B) Karnal

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World Organisations

4 3502
Q:

The act of formally approving something is known as Arbitration.

A) TRUE B) FALSE
Answer & Explanation Answer: B) FALSE

Explanation:

The act of formally approving something is known as Ratification.

Report Error

View Answer Workspace Report Error Discuss

2 3502