Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- char *cdecl( char *p, int x)
- {
- char *z;
- int h1;
- h1=sizeof(p);
- z=(char *)malloc((h1+100000)*sizeof(char));
- sprintf(z,"int %s = %d;",p,x);
- return (char *)z;
- }
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- char s[ 1000 ];
- int n;
- char *cdecl( char *, int );
- while ( scanf( "%s%d", s, &n ) != EOF )
- {
- char *p = cdecl( s, n );
- puts( p );
- free( p );
- }
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement