Barracuda networks (A Bangalore's Startup) written Round Programming Questions
1) C program to copy one file to another. #include<bits/stdc++.h> using namespace std; int main() { char ch,src[20],tgt[20]; FILE *s,*t; gets(src); s=fopen(src,"r"); if(s==NULL) { printf("press any key to exit\n"); exit(EXIT_FAILURE); } gets(tgt); t=fopen(tgt,"w"); if(t==NULL) { printf("press any key to exit\n"); exit(EXIT_FAILURE); } while(( ch=fgetc(s))!=EOF) fputc(ch,t); return 0; } - ---------------------------------------------------------------------------------------------------------------------- 2 ) use function pointer to add , sub and multiply #include<bits/stdc++.h> using namespace std; ...