0

In a string...how to print individual character?

20th Feb 2018, 4:59 AM
Tarun Ella
Tarun Ella - avatar
3 Antworten
+ 3
Um, by using [] ? E.g. : char str[]="Hello"; printf("%c",str[1]); /* Prints second character. */ /* Output = e */
20th Feb 2018, 5:31 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
0
@kinshuk vasisht but if I use for loop to print 1by 1 character
20th Feb 2018, 3:52 PM
Tarun Ella
Tarun Ella - avatar
0
like ex: H e l l o
20th Feb 2018, 3:54 PM
Tarun Ella
Tarun Ella - avatar