Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    char *s = "myworld";
    int i = 9;
    printf("%*s", i, s);
}

A. myworld

B. myworld(note: spaces to the left of myworld)

C. myworld (note:followed by two spaces after myworld)

D. Undefined

Answer: Option B


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output