+ 1
char a = "hello world" ; printf("%. 2s",a);
It's output is "he". Can we store the output in a variable.
2 Antworten
0
char buffer[SIZE];
sprintf(buffer, "%.2s" ,a);
0
David it's char * a
It's output is "he". Can we store the output in a variable.