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

In which year was the first solid state integrated circuit demonstrated?

A) 1970s B) 1960s
C) 1950s D) 1980s
 
Answer & Explanation Answer: C) 1950s

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Inventions

3 3481
Q:

15th August is the Independence day of India and

A) South korea B) Indonesia
C) China D) Pakistan
 
Answer & Explanation Answer: A) South korea

Explanation:
Report Error

View Answer Report Error Discuss

7 3481
Q:

The number of members nominated by the president to the Rajya Sabha is Constitutionally limited to

A) 12 B) 15
C) 10 D) 20
 
Answer & Explanation Answer: A) 12

Explanation:

The Council of States (Rajya Sabha) is composed of not more than 250 members, of whom 12 are nominated by the President. The twelve members are chosen by him from among persons having special knowledge or practical experience in literature, science, art, and social service. The Constitution thus adopts the principle of nomination, for according distinguished Indians a place in the Upper Chamber (Rajya Sabha) of Parliament.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

5 3481
Q:

Government regulation is intended to

A) discourage producers from taking harmful actions. B) encourage producers to follow the Constitution.
C) discourage producers from making a profit. D) encourage producers to take negative actions.
 
Answer & Explanation Answer: A) discourage producers from taking harmful actions.

Explanation:

Government regulation protects constitutional rights, safety, and fairness.

 

Hence, Government regulation is intended to discourage producers from taking harmful actions.

Report Error

View Answer Report Error Discuss

3 3481
Q:

Iodex, a pain relief balm, has the smell of __________ .

A) Methyl salicylate B) Ethyl salicylate
C) Propyl salicylate D) Butyl salicylate
 
Answer & Explanation Answer: A) Methyl salicylate

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Chemistry

3 3479
Q:

The comparative form of adjectives compares

A) more than two things or people. B) the past to the present.
C) two things or people. D) at least a dozen different times.
 
Answer & Explanation Answer: C) two things or people.

Explanation:

A comparative compares a person or thing with another person or thing. A superlative compares a person or thing with the whole group of which that person or thing is a member

Comparative adjectives compare one person or thing with another and enable us to say whether a person or thing has more or less of a particular quality.

Example :: I’m more interested in music than studies, Arun is taller than Karthik.

Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: AIEEE , Bank Exams , CAT , GATE , GRE , TOEFL
Job Role: Analyst , Bank Clerk , Bank PO

4 3479
Q:

The Number of officially recognised languages in india is

A) 12 B) 15
C) 18 D) 21
 
Answer & Explanation Answer: C) 18

Explanation:

India has 18 officially recognised languages - Konkani, Manipur and Nepali were added to the official list of 15 in 1992. The other 15 languages are Assamese, Bengali, Gujarati, Hindi, Kannada, Kashmiri, Malayalam, Marathi, Oriya, Punjabi, Sanskrit , Tamil, Telugu , Urdu and sindhi.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography

4 3479