Current Affairs Monthly Magazine -Subscribe Now!
900 GEOGRAPHY MCQS | EBook
1000 BIOLOGY MCQS AND ANSWERS | EBook
1000 POLITICAL SCIENCE MCQS | EBook
1000 ECONOMICS MCQS FOR EXAMS | EBook
Mughal Empire MCQs | EBook
ECONOMIC GEOGRAPHY MCQs | EBook
350 MCQs ON INDIAN CONSTITUTION | EBook
GENERAL AWARENESS COMBO (6 EBOOKS)

Question

Study the following ā€˜Cā€™ program

#include <stdio.h>
void main ()
{ 
    int a = 7, b = 5;
    switch (a/a % b)
    { 
         case 1 : a = a-b;
         case 2 : a = a+b;
         case 3 : a = a*b;
         case 4 : a = a/b;
         default : a = a;
    } 
}

One the execution of above program, what will be the variable a?

A 2
B 5
C 7
D 12
Answer & Explanation
Option: [C]

Month-wise Current Affairs 2022

Category-wise Current Affairs

Jobs by Qualification

Free Mock Test