Jump to content

Search the Community

Showing results for tags 'verific'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Informatii generale
    • Anunturi importante
    • Bine ai venit
    • Proiecte RST
  • Sectiunea tehnica
    • Exploituri
    • Challenges (CTF)
    • Bug Bounty
    • Programare
    • Securitate web
    • Reverse engineering & exploit development
    • Mobile security
    • Sisteme de operare si discutii hardware
    • Electronica
    • Wireless Pentesting
    • Black SEO & monetizare
  • Tutoriale
    • Tutoriale in romana
    • Tutoriale in engleza
    • Tutoriale video
  • Programe
    • Programe hacking
    • Programe securitate
    • Programe utile
    • Free stuff
  • Discutii generale
    • RST Market
    • Off-topic
    • Discutii incepatori
    • Stiri securitate
    • Linkuri
    • Cosul de gunoi
  • Club Test's Topics
  • Clubul saraciei absolute's Topics
  • Chernobyl Hackers's Topics
  • Programming & Fun's Jokes / Funny pictures (programming related!)
  • Programming & Fun's Programming
  • Programming & Fun's Programming challenges
  • Bani pă net's Topics
  • Cumparaturi online's Topics
  • Web Development's Forum
  • 3D Print's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber


Skype


Location


Interests


Occupation


Interests


Biography


Location

Found 1 result

  1. Salut, vreau sa citesc informatii din fisierul in.txt, sa le ordonez folosid qsort si sa le afisez in alt fisier, out,txt. Nu-mi dau seama de ce intra in bucla infinita, sau unde, ceva ajutor? #include <stdio.h> #include <stdlib.h> #include <string.h> #include <conio.h> void verific (FILE *f) { if (f==NULL) { printf("Eroare deschidere fisier\n"); exit(1); } } void afisare (char* a[], int n) { int i; for(i=0;i<n;i++) if(a[i]!=NULL) printf("%s\n",a[i]); } int fqs (const void *a, const void * { return strcmp ( *(char**)a , *(char**)b ); } int citesc (FILE *f, char* a[]) { int i=0; char buf[100]; fread(buf,sizeof(char),1,f); while (*buf != '\0') { a[i]=strdup(buf); if(a[i]==NULL) { printf("Alocare esuata"); exit(1); } i++; } return i; /* int i=0; char buf[100]; fgets(buf,sizeof(char*),f); while (*buf != '\0') { a[i]=strdup(buf); if(a[i]==NULL) { printf("Alocare esuata"); exit(1); } i++; fgets(buf,sizeof(char*),f); } return i; */ } int scriu (FILE *f, char* a[], int n) { fwrite(a,sizeof(char*),n,f); fputs("\n\n",f); } int main() { int n; FILE *f=fopen("in.txt","rt"); FILE *g=fopen("out.txt","wt"); verific(f); verific(g); char* a[100]; n=citesc(f,a); afisare(a,n); scriu(g,a,n); qsort(a,n,sizeof(char*),fqs); scriu(g,a,n); return 0; }
×
×
  • Create New...