Questions

Q:

Answer the following Program

#define CHARSIZE 8

#define MASK(y) (1 << y % CHARSIZE)

#define BITSLOT (y) (y / CHARSIZE)

#define SET(x,y) ( x[BITSLOT(y)] = MASK(y) )

#define TEST(x,y) ( x[BITSLOT(y)] & MASK(y) )

#define NUMSLOTS(n) ((n + CHARSIZE - 1) / CHARSIZE)

 

Give the above macros how would you

1. declare an array arr of 50 bits

2. put the 20th bit on

3. test whether the 40th bit is on or off

Answer

1. char arr[NUMSLOTS(50)];


2. SET (arr, 20);


3. if (TEST (arr, 40))

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2780
Q:

There is no reason (that life may exist) P (in great profusion) Q (why we should not be willing to think) R (in other worlds) S

The correct sequence should be

A) R S P Q B) P Q S R
C) R P Q S D) R Q S P
 
Answer & Explanation Answer: C) R P Q S

Explanation:

Since, the sentence starts talking about the reason; R will be the continuing statement as it goes with the flow of the statement. The continuing statement talks about the existing of life i.e. P. Thus, all other options are eliminated. The correct formation would be, ‘There is no reason why we should not be willing to think that life may exist in great profusion in other worlds.’

Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 2780
Q:

The National forest policy aims at maintaining how much of the geographical area under forests

A) Half B) One-third
C) One-fourth D) One-fifth
 
Answer & Explanation Answer: B) One-third

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

0 2779
Q:

In the following question, a sentence has been given in Direct/Indirect speech. Out of the four alternatives suggested, select the one, which best express the same sentence in Indirect/Direct speech.

'What do you want?' Sheila asked Rohan.

 

A) Sheila asked Rohan what do you want. B) Sheila asked Rohan what he wanted.
C) Sheila asked Rohan what does he want. D) Sheila asked Rohan what he wants.
 
Answer & Explanation Answer: B) Sheila asked Rohan what he wanted.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 2779
Q:

The day-to-day condition of the atmosphere at a place with respect to the temperature, humidity, rainfall, wind speed, etc., is called the________________ at that place.

 

A) climate B) ecology
C) environment D) weather
 
Answer & Explanation Answer: D) weather

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: Bank Exams

5 2779
Q:

What does deficit spending require a government to do?

A) cut taxes B) hire more workers
C) lay off workers D) take on debt
 
Answer & Explanation Answer: D) take on debt

Explanation:

Deficit spending means spending more than the income getting. A government need to take debts for deficit spending.

Report Error

View Answer Report Error Discuss

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

1 2779
Q:

Tower of Victory or Vijay stambh in Rajasthan is located in which place?

A) Chittorgarh B) Udaipur
C) Ajmer D) Jaipur
 
Answer & Explanation Answer: A) Chittorgarh

Explanation:

The Vijaya Stambha is an imposing victory monument located within Chittor Fort in Chittorgarh, Rajasthan, India. The tower was constructed by the Mewar king, Rana Kumbha, in 1448 to commemorate his victory over the combined armies of Malwa and Gujarat led by Mahmud Khilji.

 

Tower_of_Victory1561370930.JPG image

Report Error

View Answer Report Error Discuss

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

2 2779
Q:

A sentence has been given in Direct/Indirect Speech. Out of the four given alternatives, select the one which best expresses the same sentencein Indirect/Direct Speech

She says, “I am playing tennis.

A) She says that she was playing tennis B) She was playing tennis.
C) She said she was playing tennis D) She says that she is playing tennis.
 
Answer & Explanation Answer: D) She says that she is playing tennis.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: CAT , GRE , TOEFL
Job Role: Bank Clerk , Bank PO

1 2778