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 3317
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 3316
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 3316
Q:

The term hierarchy refers to

A) a team in which everyone is equal and has to pull his or her own weight B) a power structure in which each member knows his or her own place
C) a situation in which higher species such as men will always be in control of lower species such as animals D) a condition in which the weak must die so the strong can survive
 
Answer & Explanation Answer: B) a power structure in which each member knows his or her own place

Explanation:

Hierarchy is a system of ranking in which members of a particular society are ranked in an ascending order depending on various factors.

 

Hence, the term hierarchy refers to a power structure in which each member knows his or her own place.

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

2 3316
Q:

In ancient Greek city states the central district would be built on a hilltop and it would contain the chief municipal and religious buildings . What was this place called?

Answer

Acropolis

Report Error

View answer Workspace Report Error Discuss

1 3315
Q:

Which alphabet is a bird?

A) Y B) C
C) B D) D
 
Answer & Explanation Answer: C) B

Explanation:

The letter 'B' sounding resembles same as the bird 'Bee'. 

Which_alphabet_is_a_bird1537939857.jpg image

 

Hence, alphabet 'B' is a bird.

Report Error

View Answer Report Error Discuss

Filed Under: Word Puzzles
Exam Prep: TOEFL , GRE , CAT , Bank Exams , AIEEE
Job Role: Bank PO , Bank Clerk , Analyst

0 3315
Q:

Where are genes located in the cell?

Answer

Genes are located on DNA present in the chromosome. Chromosomes are present in the nucleus of the cell.

Report Error

View answer Workspace Report Error Discuss

Subject: Biology Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

1 3315
Q:

Smasher is associated with which of the following sports?

A) Hockey B) Foot ball
C) Volley ball D) Boxing
 
Answer & Explanation Answer: C) Volley ball

Explanation:
Report Error

View Answer Report Error Discuss

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

2 3314