Document
Document
Possible Questions:
1. What is programming?
Answer:
#include <stdio.h>
Int main() {
Printf(“%d “, arr[i]);
Return 0;
}
3. Functions and Function Parameter Passing (10-15 Marks)
Possible Questions:
Answer:
#include <stdio.h>
Int factorial(int n) {
If (n == 0) return 1;
Int main() {
Int num = 5;
Printf(“Factorial: %d”, factorial(num));
Return 0;
Possible Questions:
Struct Student {
Int id;
Char name[50];
Float marks;
};
Struct Student {
Int id;
Char name[50];
Float marks;
};
Int main() {
Return 0;
Answer: File handling in C is used to create, read, write, and modify files.
Common file functions are:
#include <stdio.h>
Int main() {
FILE *fptr;
Fclose(fptr);
Char str[100];
Fscanf(fptr, “%[^\n]”, str);
Fclose(fptr);
Return 0;
Study Tips: