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

In 1948 , in which former princely state in west India was a referendum held when the people decided to join the Indian Union?

Answer

Junagadh

Report Error

View answer Workspace Report Error Discuss

3 2349
Q:

Warts are contagious.

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

Explanation:

Yes. Warts are contagious.


You can get warts from touching a wart on someone else's body or by coming in contact with surfaces that touched someone's warts, such as towels or bathmats.


warts_are_contagious1532510865.jpg image


 


Hence, the given statement that, 'Warts are contagious' is TRUE.

Report Error

View Answer Workspace Report Error Discuss

Subject: General Science
Exam Prep: AIEEE , Bank Exams , GATE
Job Role: Analyst , Bank Clerk , Bank PO

1 2349
Q:

The Dowry Prohibition (Amendment) Act came into force from __________

Answer

The Dowry Prohibition (Amendment) Act came into force from october2, 1985. This made the original Act more stringent and effective.

Report Error

View answer Workspace Report Error Discuss

2 2348
Q:

The First Speaker against whom a motion of no-cofidence was moved in the in the Lok Sabha was_______

A) Balram Jhakhar B) G.V. Mavalankar
C) Hukum Singh D) K.S. Hedge
 
Answer & Explanation Answer: B) G.V. Mavalankar

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics

1 2348
Q:

What is the Capital city of Peru?

A) Sucre B) Manama
C) Lima D) Bogota
 
Answer & Explanation Answer: C) Lima

Explanation:

Lima is the Capital of Peru and its Currency is Sol.

Report Error

View Answer Report Error Discuss

Filed Under: World Geography
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

0 2348
Q:

'.bak' extension refers to what kind of file?

A) Document B) Movie/Video file
C) Backup file D) Audio file
 
Answer & Explanation Answer: C) Backup file

Explanation:

In computing, ".bak" is a filename extension commonly used to signify a backup copy of a file.

Report Error

View Answer Report Error Discuss

3 2346
Q:

Energy is measured in units called

A) Newtons B) Watts
C) Joules D) Ohm/mtr
 
Answer & Explanation Answer: C) Joules

Explanation:

Energy is measured in units called Joules.

 

Joule is unit of work or energy in the International System of Units (SI) which is equal to the work done by a force of one newton acting through one metre.

 

1 Joule  =  107 ergs or 0.7377 foot-pounds.

Report Error

View Answer Report Error Discuss

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

4 2346