Guest User

Untitled

a guest
Jul 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. char *s = (char *) malloc(100);
  2. char sa[100];
  3.  
  4. int main(int argc,char* argv[]){
  5. char *s = (char *) malloc(20);
  6. char sa[400] = {0};
  7. int i ,count;
  8. printf(" enter the number of chars to write: ");
  9. scanf("%d",&count);
  10. for (i=0;i<count;i++){
  11. printf("%dn",i);
  12. sa[i] = 'a';
  13. //s[i] = 'a';
  14. }
  15. free(s);
  16.  
  17. }
Add Comment
Please, Sign In to add comment