Questions

Q:

Point out the error, if any, in the following program.

#include "stdio.h"

main()

{

      unsigned char;

       FILE *fp;

       fp = fopen ("trail", "r");

       while (( ch = getc (fp)) ! = EOF)

               printf ("%c", ch);

       fclose (fp);

}  

Answer

EOF has been defined as #define EOF -1 n the file "stdio.h" and an unsigned char ranges from 0 to 255 hence when EOF is read from the file it cannot be accommodated in ch. Solution is to declare ch as an int.

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

1 3307
Q:

When is the International Firefighters' Day(IFFD) observed every year ?

A) 2 May B) 4 May
C) 3 May D) 6 May
 
Answer & Explanation Answer: B) 4 May

Explanation:

International Firefighters' Day (IFFD) is observed on May 4. It was instituted after proposal emailed out across the world on January 4, 1999 due to the deaths of five firefighters in tragic circumstances in a bushfire in Australia.

Report Error

View Answer Report Error Discuss

Filed Under: Important Days and Years
Exam Prep: Bank Exams , CAT

3 3307
Q:

Roentgen discovered

A) Electrocardiograph B) X–rays
C) Anti polio vaccine D) Encephalograph
 
Answer & Explanation Answer: B) X–rays

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Inventions

3 3306
Q:

A Transparent DBMS

A) Keep its logical structure hidden from users B) Can access control
C) Keeps its physical structure hidden from users D) Can not hide sensitive information from users
 
Answer & Explanation Answer: C) Keeps its physical structure hidden from users

Explanation:

DBMS :: Database Managemet System.

A DBMS which keeps its physical structure hidden from the user is known as a transparent DBMS.

Report Error

View Answer Report Error Discuss

2 3306
Q:

Which of the following is the single most important source of the history of Ashoka?

A) Sri Lankan chronicles_ Dipavamsa and Mahavamsa B) Buddhist works Divyavadana and Ashokavadana
C) Inscriptions of Ashoka D) Archaeological Sources and the Puranas
 
Answer & Explanation Answer: C) Inscriptions of Ashoka

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

3 3306
Q:

Explain the concept of Reentrancy?

Answer

It is a useful, memory-saving technique for multiprogrammed timesharing systems. A Reentrant Procedure is one in which multiple users can share a single copy of a program during the same period. Reentrancy has 2 key aspects: The program code cannot modify itself, and the local data for each user process must be stored separately. Thus, the permanent part is the code, and the temporary part is the pointer back to the calling program and local variables used by that program. Each execution instance is called activation. It executes the code in the permanent part, but has its own copy of local variables/parameters. The temporary part associated with each activation is the activation record. Generally, the activation record is kept on the stack.


Note: A reentrant procedure can be interrupted and called by an interrupting program, and still execute correctly on returning to the procedure.

Report Error

View answer Workspace Report Error Discuss

0 3306
Q:

Per Captain Income of a country derived from

A) National Income B) Population
C) National Income and Population both D) none of these
 
Answer & Explanation Answer: C) National Income and Population both

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

1 3306
Q:

Genes are situated on _________

A) Chromosome B) Mitochondria
C) Plastids D) Ribosomes
 
Answer & Explanation Answer: A) Chromosome

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

7 3306