1. Question:What is the difference between printf() and sprintf() ? 

    Answer
    sprintf() writes data to the character array whereas printf(...) writes data to the standard output device.

    1. Report
  2. Question:What is the difference between %d and %*d in c language? 

    Answer
    %d give the original value of the variable and %*d give the address of the variable.
    
    eg:-int a=10,b=20;
    printf("%d%d",a,b);
    printf("%*d%*d",a,b);
    
    Result is 10 20 1775 1775 .Here 1775 is the starting address of the memory allocation for the integer.a and b having same address because of contagious memory allocation.

    1. Report
  3. Question:What is FILE? 

    Answer
    FILE is a predefined data type. It is defined in stdio.h file.

    1. Report
  4. Question:What is a file? 

    Answer
    A file is a region of storage in hard disks or in auxiliary storage devices.It contains bytes of information .It is not a data type.

    1. Report
Copyright © 2024. Powered by Intellect Software Ltd