C Programming

Casual Mode - Take your time!

1 / 11
Correct
0
Incorrect
0
Score
0%
Multiple Choice

What will be the output of the following program if 'n' key is pressed after execution of program?
#include<stdio.h>
#include<process.h>
void main()
{char ch;
printf("enter Y/y to continue");
scanf("%c",&ch);
if(ch=='y' || ch=='Y')
printf("Yes");
else
exit(1);
}

Consider the letters written like A, B, C, V are the keys prssed by user. User can press any key, we have considered following keys has been prssed.

  1. Yes
  2. Exit from program
  3. Error: exit function should have prototype
  4. No
  5. None of these
Change Mode