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:

Consider the following statements relating to Coal India Limited:1. It is designated as a 'Maha Ratna'company under the Ministry of Coal.2. It is the single largest coal producing company in the world.3. The Headquarters of Coal India Limited is located at Ranchi Jharkhand.
Which of the statements given above is/are correct?

A) 1 only B) 1 and 2only
C) 2 and 3 only D) 1, 2 and 3
 
Answer & Explanation Answer: B) 1 and 2only

Explanation:

Headquarters Kolkata, West Bengal, IndiaCoal India Limited (CIL) is an Indian state-controlled coal mining company headquartered in Kolkata, West Bengal, India and the largest coal-producing company in the world and a Maharatna company.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: Bank Exams

2 3307
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
Q:

Which structure is common to plant and animal cells?

A) Centriole B) Chloroplast
C) Central Vacuole D) Mitochondria
 
Answer & Explanation Answer: D) Mitochondria

Explanation:

Mitochondria are present in both plant and animal cells.

Report Error

View Answer Report Error Discuss

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

3 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:

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:

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