+ 1

how to accept combination of letters and numbers in both c and cpp? ex:-afh13gs02

1st Sep 2016, 3:45 PM
Suhail Pappu
Suhail Pappu - avatar
8 Réponses
+ 1
can u explain with an example program step by step?
1st Sep 2016, 3:53 PM
Suhail Pappu
Suhail Pappu - avatar
+ 1
how to get input? i mean we shd type our own words
1st Sep 2016, 3:59 PM
Suhail Pappu
Suhail Pappu - avatar
+ 1
gets(name);
1st Sep 2016, 4:01 PM
Ravi ola
Ravi ola - avatar
+ 1
thx
1st Sep 2016, 4:19 PM
Suhail Pappu
Suhail Pappu - avatar
0
use strcpy function
1st Sep 2016, 3:50 PM
Ravi ola
Ravi ola - avatar
0
ex-strcpy(name,"ravi123");
1st Sep 2016, 3:52 PM
Ravi ola
Ravi ola - avatar
0
#include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> void main() { char name[20]; strcpy(name,"ravi123"); puts(name); getch(); }
1st Sep 2016, 3:56 PM
Ravi ola
Ravi ola - avatar
0
OK?
1st Sep 2016, 3:58 PM
Ravi ola
Ravi ola - avatar