0

Consider there is a string
"hai welcome..."

I need to print the string as such leaving the first three characters..

I should not use in-built functions or others...

It should b done in a single printf statement by changing the control string pattern..

3
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by vani krishnan
0

Can you be more specific? "Leaving the first three characters" is ambiguous. Do you want to print only the first three characters of a string, or all characters except the first three?

Edited by Narue: n/a

0

Can you be more specific? "Leaving the first three characters" is ambiguous. Do you want to print only the first three characters of a string, or all characters except the first three?

all others except the first three characters...

0

Well if it should not be done with a single printf statement, then it should be done using pointers. Supposing you have a "str" variable of type char* to hold your string here is what you should do:

str += 3;
printf("%s\n",str);
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.