Programming in C - I/O Operations

26. int i = 5;
is a statement in a C program. Which of the following are true?

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 *


27. The following program
main ()
{
 float a = .5, b = .7;
 if (b < .7)
{
 if (a < .5)
  printf("TELO");
 else
  printf("LTTE");
}
 else printf("JKLF");
}

  • Option : A
  • Explanation :
    It will print 'LTTE' as a and b are of float type.
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 *


28. What is the output of the following program segment?
void max { int x, int y, int m)
{ if (x > 5) m = x;
 else m = y;
}
 int main()
{
int i = 20, j = 5, k = 0;
 max(i, j, k ); printf("%d", k) ;
}

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 *


29. Consider the program
main( )
{
 int y = 1;
 printf ("%d", (*(char *)&x)) :
}
If the machine in which this program is executed is little-endian (meaning, the lower signifi-cant digits occupy lower addresses), then the output will he

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 *


30. The program
main()
{
int i = 5;
i = (++i) / (i++);
printf ("%d", i);
prints

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 *