This document outlines the syllabus for a C programming course. It lists 14 topics to be covered, including flowcharts, algorithms, data types, variables, functions, arrays, structures, and file handling. It also provides 10 programming exercise examples to accompany the topics, such as programs to add numbers, check the greater of three numbers, create and access arrays, and write text to a file. Students are advised to study one program example for each topic and contact the instructor if they have any problems.
This document outlines the syllabus for a C programming course. It lists 14 topics to be covered, including flowcharts, algorithms, data types, variables, functions, arrays, structures, and file handling. It also provides 10 programming exercise examples to accompany the topics, such as programs to add numbers, check the greater of three numbers, create and access arrays, and write text to a file. Students are advised to study one program example for each topic and contact the instructor if they have any problems.
This document outlines the syllabus for a C programming course. It lists 14 topics to be covered, including flowcharts, algorithms, data types, variables, functions, arrays, structures, and file handling. It also provides 10 programming exercise examples to accompany the topics, such as programs to add numbers, check the greater of three numbers, create and access arrays, and write text to a file. Students are advised to study one program example for each topic and contact the instructor if they have any problems.
(Note: Apart from these, please also revise CA1and CA2 portion)
For every topic, please study one program example
CR: Please free to text me or call me if anyone of you have any problem
• Flowchart and its symbols
• Algorithm- • C Definition with example • Structure of a C program • Data Types • Variables • Comments • Constant • Function with an example • Local and Global Variable with programs • Array and Structure explanation • Difference between array and structure with example • File Handling • File handling types and its operation(Write operation program attached below, one program is sufficient for Handling topic) •
Programmes:
1. C program to add two or three numbers
2. C program to check whether a number is positive or not 3. C program to print Hello World or your name 4. C program to find the greater number between three numbers by taking input from user 5. C program to find the multiplication table of 10 using local and global variable (use loop) 6. C program to find the multiplication table of 10 using Function (use loop) 7. C program to take 5 values from the user and store them in an array(reference: https://www.programiz.com/c-programming/c-arrays) 8. C program to create an array, access the elements in the array, change the array.(reference: https://www.w3schools.com/c/c_arrays.php) 9. C program to write a text in a file- File handling program
10. #include <stdio.h>
11. #include <stdlib.h> 12. 13. int main() 14. { 15. int num; 16. FILE *fptr; 17. 18. // use appropriate location if you are using MacOS or Linux 19. fptr = fopen("C:\\program.txt","w"); 20. 21. if(fptr == NULL) 22. { 23. printf("Error!"); 24. exit(1); 25. } 26. 27. printf("Enter num: "); 28. scanf("%d",&num); 29. 30. fprintf(fptr,"%d",num); 31. fclose(fptr); 32. 33. return 0; 34. }