Hi...Can anyone plz give me a program to display the contents of all files inC
Hi...Can anyone plz give me a program to display the contents of all files inC
You want a program to open and print the contents of every file in the world?
http://www.catb.org/~esr/faqs/smart-questions.htmlCode:#include <stdio.h> int main(void) { printf("Ask a real question.\n"); return 0; }
Plz help me to fin out the program to concaternate the contents of all the files
I have three files..and i need to concatenate these...not the whole files in the world
Don't spam the forum for your sense of urgency.
<<threads merged>>
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*
How about contributing something along the lines of "I've got this far", that is, post the code for something you've managed to do already (say copy a file).
We're not here to pander to your 1-line demands for code, you need to offer up something to show you've tried first.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Hi..this is the program i wrote to find the pattern matching..how can i alter the same to find pattern skipping?
Code:#include<STDIO.H> main(){ int lengthofTot; char total[1000]; char Patstring[100]; int result[100]; int lengthofPat; int i,j,k,l=0,boom=0; clrscr(); printf("Enter the Sequence:"); scanf("%s",&total); printf("Enter the Pattern:"); scanf("%s",Patstring); lengthofTot = strlen(total); lengthofPat = strlen(Patstring); for(i=0;i<lengthofTot;i++){ k = i; for(j=0;j<lengthofPat;j++){ if(Patstring[j] == total[k]){ k=k+1; l=l+1; } } if(l==lengthofPat){ result[boom] = i; boom=boom+1; } l=0; } printf("Occurance:\n"); for(i=0;i<boom;i++){ printf("%d - %d;\n",result[i]+1,result[i]+lengthofPat); } getch(); }
hmm.. all files with an extension name of .C?
is that what you mean?
i posted two problems that i have..the first one was what you say concatenating the files with an extension of .c...the code that i have sent now is a different problem ie to find the pattern skipping of a string