Questions

Q:

The output of the code below is

       #include <stdio.h>
        void main()
        {
            int i = 0, k;
            if ( i == 0 )
                goto label;
                for ( k = 0;k < 3; k++ )
                {
                    printf( "hin" );
                    label: k = printf( "%03d", i );
                }
         }

A) 0 B) hi hi hi 0 0 0
C) 0 hi hi hi 0 0 0 D) 0 0 0
 
Answer & Explanation Answer: A) 0

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Programming

1 20915
Q:

Which river flows south to north?

A) Brahmaputra B) Narmada
C) Ganga D) Krishna
 
Answer & Explanation Answer: B) Narmada

Explanation:

Narmada is the only river which flows from south to north in the given options.

Report Error

View Answer Report Error Discuss

Filed Under: Indian Geography
Exam Prep: AIEEE , Bank Exams , GATE
Job Role: Analyst , Bank Clerk , Bank PO

23 20915
Q:

Find the odd word/letters/number from the given alternatives.

(A) BCE (B) WXZ (C) MNP (D) GHK

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

Explanation:
Report Error

View Answer Report Error Discuss

0 20895
Q:

Number of eyes found in Earthworm..........

A) One B) Many
C) No eye D) Two
 
Answer & Explanation Answer: C) No eye

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology

145 20839
Q:

Which of the following parts of the sun is easily visible only during a total solar eclipse? 

A) core B) photosphere
C) sunspots D) corona
 
Answer & Explanation Answer: D) corona

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: General Science

139 20835
Q:

Between which of the following was the ancient town of Takshasila located

A) Indus and Jhelum B) Jhelum and Chenab
C) Chenab and Ravi D) Ravi and Beas
 
Answer & Explanation Answer: A) Indus and Jhelum

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian History

48 20831
Q:

What will be output when you will execute following c code?

#include <stdio.h>
enum actor

{
    SeanPenn=5,
    AlPacino=-2,
    GaryOldman,
    EdNorton
};
void main()

{
     enum actor a=0;
     switch(a)

      {
         case SeanPenn:  printf("Kevin Spacey");
                         break;
         case AlPacino:  printf("Paul Giamatti");
                         break;
         case GaryOldman:printf("Donald Shuterland");
                         break;
         case EdNorton:  printf("Johnny Depp");
      } 
}

A) Kevin Spacey B) Paul Giamatti
C) Donald Shuterland D) Johnny Depp
 
Answer & Explanation Answer: D) Johnny Depp

Explanation:

Default value of enum constant
GaryOldman = -2 +1 = -1
And default value of enum constant
EdNorton = -1 + 1 = 0
Note: Case expression can be enum constant.

Report Error

View Answer Report Error Discuss

Filed Under: Programming

1 20830
Q:

If the following program (myprog) is run from the command line as 

myprog 1 2 3 

what would be the output?

main(int argc, char *argv[])

{

    int i, j = 0;

    for (i = 0; i < argc ; i++)

           j = j + atoi ( argv[i]);

    printf ("%d", j);

}

A) 123 B) 6
C) Error D) "123"
 
Answer & Explanation Answer: B) 6

Explanation:

When atoi() tries to convert argv[0] to a number it cannot do so (argv[0] being a file name) and hence returns a zero.

Report Error

View Answer Report Error Discuss

Filed Under: Programming

2 20821