The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-23-2007
the_learner the_learner is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 75
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