how do I accomplish this
"abc.i"
where i should vary from 1 to n
where abc is string
how do I accomplish this
"abc.i"
where i should vary from 1 to n
where abc is string
moving to the c forum...
take a string, create another string from an integer (look into standard functions to learn how to do this, or create your own), and concatenate the two strings.
i disagree. sprintf() is easier to use and more flexible imoOriginally posted by ygfperson
moving to the c forum...
take a string, create another string from an integer (look into standard functions to learn how to do this, or create your own), and concatenate the two strings.
hello, internet!
could u please write the entire code for the program
no.Originally posted by cbankgoesblank
could u please write the entire code for the program
hello, internet!
doh... i always forget about sprintf...Originally posted by moi
i disagree. sprintf() is easier to use and more flexible imo
We have a string abc and integer i
the function needs the follwing argument
ie "abc.i"
here i should vary between 1 and n
the problem is
when i say this
. is a char
in abc.i
for(i=1;i<n;i++)
funct("abc.i")
the value of i doesnt vary from 1 to n
please write the command
which will help me do this
for this particular problem
not in general
did you consult your standard library's documentation on sprintf() yet?Originally posted by cbankgoesblank
We have a string abc and integer i
the function needs the follwing argument
ie "abc.i"
here i should vary between 1 and n
the problem is
when i say this
. is a char
in abc.i
for(i=1;i<n;i++)
funct("abc.i")
the value of i doesnt vary from 1 to n
please write the command
which will help me do this
for this particular problem
not in general
hello, internet!
Read the second post on this thread.
Then start reading some of the other threads in this forum, I've just supplied an example program that does what you ask. At least show you're making an effort, then people will be more willing to help you.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Read these rules again, i'm not saying this to be an ass but they demonstrate things you need to follow to learn to be something in this language. If someone does it for you and you don't logically think it through, not only are you not learning, but your missing the 50% of the programming thats the most fun: thinking it up!When posting, please keep in mind the principles that follow. If a post blatantly violates these guidelines, the post will be removed. The board is here to help you; the guidelines will help you get answers more quickly.
Don't expect someone to write your entire program
Program on dude.