Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int lungime(char s[])
- {
- int i, lg=0;
- for(i=0;s[i]!=0;i++)
- lg++;
- return lg;
- }
- int main()
- {
- char s[100];
- FILE *f = fopen("date.in", "r");
- fgets(s, 100, f);
- printf("%d\n", strlen(s));
- printf("%d\n", lungime(s));//functia facuta de noi
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement