![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| perl: simple question on string append | the_learner | Shell Programming and Scripting | 1 | 05-14-2007 05:09 PM |
| Simple C question... Hopefully it's simple | Xeed | High Level Programming | 6 | 12-15-2006 02:29 PM |
| concat string | mpang_ | Shell Programming and Scripting | 1 | 07-25-2006 06:03 AM |
| Concat | dhananjaysk | Shell Programming and Scripting | 1 | 03-20-2006 07:42 AM |
| Ok simple question for simple knowledge... | Corrail | UNIX for Dummies Questions & Answers | 1 | 11-28-2005 01:03 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
simple question on string concat
This is a simple question...
Code:
char *str = NULL;
int num = 0;
scanf ("%d", &num);
str = ???
I want str to point to the string num.txt For e.g: If user enters num = 5, str should point to "5.txt" How do I do that ? Thanks |
|
||||
|
Code:
/* try */ snprintf(buf,sizeof(buf),"%d.txt",num); |
| Sponsored Links | ||
|
|