Semester : S1 and S2
Subject : Computer Programming
Year : 2018
Term : MARCH
Branch : BIOTECHNOLOGY
Scheme : 2015 Full Time
Course Code : CS 100
Page:26
printf("str1 < 52"); else
printf("str1 = str2"); ۴٢۴۵۳5
(0);
}
b)
೫1೧೦11೮೮
main()
{
char name[50]; int marks, i, num;
printf("Enter number of students: ");
fptr = (fopen('T:\\student.txt", "a")}
scanf("%d", &num);
FILE *fptr;
if(fptr == NULL)
{ printf("Error!");
exit(1); } for(i = 0; i< num;
++i)
{ _ printf("For student%d\nEnter name: ", i+1); = scanf("%s", name);
printf("Enter marks:"); = scanf("%d", &marks); = fprintf(fptr,"\nName:
%s \nMarks=%d \n", name, marks);
) fclose(fptr);
return 0;
}
23.a)
#include