Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* sprintf example */
- #include <stdio.h>
- #include <string.h>
- using namespace std;
- int main()
- {
- char profile[30];
- char fn[12] = "Cindy", ln[12] = "Crawford";
- int age = 40;
- sprintf(profile, "%s %s -> %d", fn, ln, age);
- printf(" profile %s \n", profile);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement