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

What is advertising?

Answer

Advertising is defined as a paid form of communication that reaches the target audience through mass media to provide product/service and brand related information.  

Report Error

View answer Workspace Report Error Discuss

2 3254
Q:

Pollen grains in plants are produced in

A) Flower B) Stem
C) Roots D) Leaves
 
Answer & Explanation Answer: A) Flower

Explanation:
Report Error

View Answer Report Error Discuss

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

6 3254
Q:

According to Census 2001, what is the percentage of male literacy

A) 75.85 B) 70
C) 65 D) 60
 
Answer & Explanation Answer: A) 75.85

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Economy

1 3254
Q:

How many years can a cat live up to?

A) 12 B) 20
C) 35 D) 87
 
Answer & Explanation Answer: B) 20

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Animals and Birds

13 3253
Q:

Which of these cities has one part of it is in Asia and other part in Europe ?

A) Moscow B) London
C) Istanbul D) Saint Peteresburg
 
Answer & Explanation Answer: C) Istanbul

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: World History

5 3252
Q:

The only known ruler in the history of india to have fixed the prices of different commodities, rigidly enforced quality control and ensured easy availability of essential commodities was

A) lltutmish B) Alauddin Khalji
C) Raziya D) Gayasuddin Tughluq
 
Answer & Explanation Answer: B) Alauddin Khalji

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

2 3251
Q:

The land mass of India has an area of ______ million square km.

A) 1.28 B) 2.28
C) 3.28 D) 4.28
 
Answer & Explanation Answer: C) 3.28

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: Bank Exams

0 3251