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

Which of the following contributed to the failure of prohibition?

A) it was not imposed strictly on immigrants B) many americans didnt consider drinking to be a crime
C) it adversely affected american productivity D) organized crime controlled illegal alcohol production
 
Answer & Explanation Answer: D) organized crime controlled illegal alcohol production

Explanation:

Crime connected with illegal alcohol production and sale became a major issue so that even many people who had originally supported Prohibition decided that it needed to be repealed.

Report Error

View Answer Report Error Discuss

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

0 2808
Q:

What are the different types of SQL statements ?

Answer

SQL statements are broadly classified into three. They are


1. DDL – Data Definition Language


DDL is used to define the structure that holds the data. For example, Create, Alter, Drop and Truncate table.


2. DML – Data Manipulation Language


DML is used for manipulation of the data itself. Typical operations are Insert, Delete, Update and retrieving the data from the table. The Select statement is considered as a limited version of the DML, since it can't change the data in the database. But it can perform operations on data retrieved from the DBMS, before the results are returned to the calling function.


3. DCL – Data Control Language


DCL is used to control the visibility of data like granting database access and set privileges to create tables, etc. Example - Grant, Revoke access permission to the user to access data in the database.

Report Error

View answer Workspace Report Error Discuss

4 2808
Q:

What is true about economic resources?

A) Economic resources are limited. B) Economic resources are always controlled by the government.
C) Economic resources include only money. D) Economic resources exist only at the individual level.
 
Answer & Explanation Answer: A) Economic resources are limited.

Explanation:

Economic resources are those goods and services that can be converted into valuable products for individual and business purposes.

There are four major types of economic resources:

1. land,

2. labor,

3. capital and

4. entrepreneurship.

 

Land and labor are natural and human resources, while capital means physical resources or money.

Entrepreneurship converts these resources into usable goods.

 

However, resources have finite values, and proper utilization depends on economic systems and economic decisions.

Report Error

View Answer Report Error Discuss

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

2 2808
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 2807
Q:

Ticks and mites are actually

A) Arachnids B) Insects
C) Myriapods D) Crustaceans
 
Answer & Explanation Answer: A) Arachnids

Explanation:
Report Error

View Answer Report Error Discuss

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

7 2806
Q:

Heat energy is transferred by conduction whenever molecules

A) collide each other B) means of photons
C) particles replaces there places D) All of the above
 
Answer & Explanation Answer: A) collide each other

Explanation:

Heat energy can be transferred by three major methods. They are 

 

1. Conduction,

2. Convection and

3. Radiation.

 

Conduction is the movement of heat through a substance by the collision of molecules

Convection occurs when particles with a lot of heat energy in a liquid or gas move and take the place of particles with less heat energy.

Radiation is the transfer of energy by means of photons in electromagnetic waves governed by the same laws. It occurs through a vacuum or any transparent medium.

Report Error

View Answer Report Error Discuss

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

1 2806
Q:

What are the followers of Islam called

A) Muhammads B) Abrahams
C) Muslims D) Ishas
 
Answer & Explanation Answer: C) Muslims

Explanation:

The followers of Islam religion is called Muslims.

 

According to Muslims, God sent prophets to mankind to teach them how to live according to His law. Muhammad is believed by Muslims to be the last prophet sent by God (Allah). The Muslim holy book is called the Quran.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk

2 2806