- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
main() { int i=1; printf("%d,%d,%d",i,i++,i++); } the o/p is 3,2,1. But how it is possible In which order does printf executes??why it is not 1,2,3. |
|
Re:
main.c #include <stdio.h> #include <stdlib.h> #define MAX_USERS 100 typedef struct Utilizadores{ char *login; char *pwd; } USERS; void ReadUsers(USERS user[]); int u = 0; int main(){ USERS user[MAX_USERS]; ReadUsers(user); return 0; } void ReadUsers(USERS user[]){ FILE *fp; fp = fopen("/home/Jiwe/Desktop/users.txt", "r"); while(fscanf(fp, "%s[^=]=%s\n", user[u].login, user[u].pwd) != EOF){ u++; } fclose(fp); … |
|
Re:
I can't tell why this piece of code wont work, but another one which I wrote does because they look exactly the same to me. Please tell me if you can see what the difference is because I cannot. I tried using the code snippet thing, but it doesn't let … |