Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. int lungime(char s[])
  6. {
  7. int i, lg=0;
  8. for(i=0;s[i]!=0;i++)
  9. lg++;
  10. return lg;
  11. }
  12.  
  13. int main()
  14. {
  15. char s[100];
  16. FILE *f = fopen("date.in", "r");
  17. fgets(s, 100, f);
  18.  
  19.  
  20. printf("%d\n", strlen(s));
  21. printf("%d\n", lungime(s));//functia facuta de noi
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement