Programming in C - I/O Operations

16. Replacing > by < in the previous question results in

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


17. If a = 9, b = 5 and c = 3,
then the expression ( a - a/b * b % c) > a % b % c
evaluates to

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


18. Consider the declaration
static char hello[ ] = " hello " ;
The output of printf( " % s \ n ", hello) ;
will be the same as that of

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


19. The following program
main()
{
printf ("tim");
main( ) ;
}

  • Option : B
  • Explanation :
    This involves recursion - main ( ) calling itself. So, it keeps on printing tim.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


20. Consider the following program.
main()
{
putchar ( 'M' );
 first();
 putchar ( 'm');
}
first ( )
{ _____ }
second ( )
{
putchar ( 'd');
}
If Madam is the required output, then the body of first ( ) must be

  • Option : C
  • Explanation :
    Since madam is the required output. the function first( ) should print ' a ' call the function second ( ) that prints the 'd' and print ' a ' again. Hence c is the correct answer.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *