Advanced C 10 Slip Solution
Advanced C 10 Slip Solution
#include <stdio.h>
#include <string.h>
int main()
scanf("%s",&str1);
scanf("%s",&str2);
strcat(str1, str2);
return 0;
2) Write a C program to store and display the name, rollno and fees of a student using
structure. Pass the member of structure variable to a function called display() to display the
contents.
#include <stdio.h>
int main() {
// Declare a structure variable
struct Student student;
display(student);
return 0;
}
3) Write C program to copy contents of one file to another by changing case of each alphabet
and replacing digits by *
#include <stdio.h>
int main() {
FILE *sourceFile, *destinationFile;
char ch;
fputc(ch, destinationFile);
}
// Close files
fclose(sourceFile);
fclose(destinationFile);
return 0;
}