Home » C Programming » Input & Output » Question
  1. What will be the output of the following C code?
    #include <stdio.h>
    int main()
    {
    char *str = "Interview";
    int n = 30;
    printf("%*s", n, str);
    }
    1. Undefined
    2. Interview
    3. Interview (note:followed by two spaces after Interview)
    4. Interview(note: spaces to the left of Interview)
    5. None of these
Correct Option: D

Interview(note: spaces to the left of Interview)



Your comments will be displayed only after manual approval.