Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- char title[10][100];
- char Speaker[10][100];
- char teks[10][100000];
- int i=0;
- int hitung=0;
- FILE *penampung;
- penampung=fopen("BeeFest.txt", "r");
- if(penampung==NULL)
- printf("File tidak ditemukan");
- else{
- while(!feof(penampung)){
- fscanf(penampung, "%[^;];%[^;];%[^;];",title[hitung],Speaker[hitung],teks[hitung]);
- hitung++;
- }
- }
- for(i=0;i<hitung;i++){
- printf("Title: %s\n",title[i]);
- printf("Speaker: %s\n",Speaker[i]);
- printf("Teks: %s\n\n",teks[i]);
- }
- fclose(penampung);
- }
- // file BeeFest.txt can be downloaded from : https://www.dropbox.com/s/pjv7mm562qw6v3c/BeeFest.txt?dl=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement