Examveda
Examveda

Determine Output:
#include<stdio.h>
void main()
{
      register i=5;
      char j[]= "hello";
      printf("%s %d", j, i);
}

A. hello 5

B. hello garbage value

C. Error

D. None of These

Answer: Option A

Solution(By Examveda Team)

If you declare i as register compiler will treat it as ordinary integer and it will take integer value. i value may be stored either in register or in memory.


This Question Belongs to C Program >> C Miscellaneous

Join The Discussion

Comments ( 2 )

  1. Examveda
    Examveda :
    8 years ago

    If you declare i as register compiler will treat it as ordinary integer and it will take integer value. i value may be stored either in register or in memory.

  2. Sriram Dandamudi
    Sriram Dandamudi :
    8 years ago

    answer is error(c).since i is not declared as interger data type.

Related Questions on C Miscellaneous