Examveda

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

A. myw(note:7 spaces before myw)

B. myworld(note:2 spaces before myworld)

C. myworld (note:2 spaces after myworld)

D. myw(note:6 spaces after myw)

Answer: Option A


This Question Belongs to C Program >> File Input Output

Join The Discussion

Related Questions on File Input Output