Home / C Programming / Input / Output :: Find Output of Program

C Programming :: Input / Output

  1. What will be the output of the program ?

    #include 
     int main() 
     {   
         int a=250;  
         printf("\n", a);    
         return 0; 
     } 
    

  2. A.

    1250

    B.

    2

    C.

    50

    D.

    250

    View Answer

    Workspace

    Discuss Discuss in Forum


  3. What will be the output of the program ?

    #include 
     
     int main()
     {
          FILE *fp; 
          char ch, str[7];     
          fp=fopen("try.c", "r"); /* file 'try.c' contains "This is Nagpur" */     
          fseek(fp, 9L, SEEK_CUR);     
          fgets(str, 5, fp);     
          puts(str);
          return 0; 
     } 
    

  4. A.

    agpur

    B.

    gpur

    C.

    Nagp

    D.

    agpu

    View Answer

    Workspace

    Discuss Discuss in Forum


  5. What will be the output of the program if value 25 given to scanf()?

     #include
    
      int main()
      {  
          int i;  
          printf("%d\n", scanf("%d", &i));     
          return 0; 
      } 
    

  6. A.

    25

    B.

    2

    C.

    1

    D.

    5

    View Answer

    Workspace

    Discuss Discuss in Forum