C Programming Multiple Choice Questions (MCQ) | IT Developer <?php echo $page_title; ?>
IT Developer

C Programming Multiple Choice Questions (MCQ)

C Programming - Conditional Statements & Loops Multiple Choice Questions (MCQ) - Set 13



Share with a Friend

Multiple Choice Questions


C Programming - Conditional Statements & Loops Multiple Choice Questions (MCQ) - Set 13

61. What is the output?
void main()
 {
   if ( -100 )
      printf("Negative number");
   else
      printf("Positive number");
  }
A). Positive number
B). Negative number
C). Error
D). Random Behavior
View Answer
Correct: B




62. What is the output of C Program ?
int main()
{
    int a=9, b=6;
    if(a!=9 || b==6)
    {
        printf("Hockey\n");
    }
    else
    {
        printf("Cricket\n");
    }
    
    printf("Football");

    return 0;
}
A). Cricket Football
B). Hockey Football
C). Football
D). Compiler error
View Answer
Correct: B




63. What is the output?
void main()
{
  int x= 5;
  if(x < 1);
     printf("Hello");
  printf("Hi");
}
A). Hi
B). HelloHi
C). Error
D). None of these
View Answer
Correct: B




64. Choose a correct C Operator Priority ? Items in one group ( ) has same priority.
A). ( ! ) < (*, /, %) < (+, -) < ( <, <=, >, >=) < (==, !=) < (&&) < (||) < (=)
B). (( ! ) , (*, /, %) , (+, -)) < ( <, <=, >, >=) < (==, !=) < (&&) < (||) < (=)
C). ( ! ) > (*, /, %) > (+, -) > ( <, <=, >, >=) > (==, !=) > (&&) > (||) > (=)
D). (( ! ) , (*, /, %) , (+, -)) > ( <, <=, >, >=) > (==, !=) > (&&) > (||) > (=)
View Answer
Correct: C




65. Continue statement
A). Breaks loop and goes to next statement after loop
B). does not break loop but starts new iteration
C). exits the program
D). Starts from beginning of program
View Answer
Correct: B