BCSL-021 Solved Assignment 2023-24 - Protected
BCSL-021 Solved Assignment 2023-24 - Protected
Learning Science
in
o.c
e.
c
en
ci
gs
in
BCSL-021
n
ar
e
Solved Assignment
//l
s:
https://learningscience.co.in
tp
ht
BCSL-021 Solved Assignment 2023-2024 (July-January)
in
Course Code BCSL-021
.
Course Title C Language Programming Lab
co
Assignment Number BCA (II)/L-021/Assignment/2023-24
e.
Maximum Marks 50
nc
Weightage 25%
ie
Last Date of Submission
30 th April, 2024 (For January Session)
sc
Note: This assignment has only one question. Answer the question. This question carries 40 marks. Rest 10 marks are for viva voce. You may use
g
illustrations and diagrams to enhance the explanation. Please go through the guidelines regarding the assignments given in the programme guide for
in
the format of presentation.
Q1. Write an interactive C program with example which prompts the user with the following options on the opening menu:
rn
1) General Information of the Learner Support Centre(LSC)
ea
6) Quit
ht
1
Enter your choice:
in
If “2” is entered, it should give the details of all the programmes those are activated in the LSC.
.
If “3” is entered, it should give the schedules for the theory and practical counselling sessions for BCA and MCA programmes for the current session.
co
If “4” is entered it should display the details of the academic councillors’ associated with respective programmes.
e.
If “5” is entered it should display the assignments submission schedules for various programmes for the current session activated in that LSC. If the user
enters any letters or numbers other than the choice, redisplay the prompt.
nc
All output should go to the terminal and all input should come from the keyboard.
ie
Note: You must execute the program and submit the program logic, sample input and output along with the necessary documentation for this practical
question. Assumptions can be made wherever necessary.
sc
Solution:
g
#include <stdio.h>
in
void displayGeneralInformation() {
rn
// Code to display general information of the Learner Support Centre
ea
2
int studyCentreCode;
scanf("%d", &studyCentreCode);
Learning Science | https://learningscience.co.in
printf("\n ----------------- General Information -----------------\n");
in
printf("\n Study Centre Code: %d\n", studyCentreCode);
.
co
// Retrieve and display the general details based on the study centre code
e.
switch (studyCentreCode) {
nc
case 1:
ie
printf("\n Name of the Regional Centre : RC 1");
sc
printf("\n Name of the Study Centre Coordinator : Rajib Mishra");
g
printf("\n Programme In-charge Details : Prosenjit Ganguly \n ");
in
break;
case 2:
rn
printf("\n Name of the Learner Support Centre (LSC) : LSC 2");
ea
break;
tp
default: 3
. in
co
}
e.
nc
void displayActivatedPrograms() {
ie
printf("\n-------------- Activated Programs --------------\n");
g sc
// Retrieve and display the activated programs
in
printf("\n 1) Bachelor of Computer Applications (BCA)");
printf("\n");
tp
}
ht
void displaySessionSchedules() {
in
// Display the session schedules
.
co
// Assuming the session schedules are stored in arrays
char bcaTheorySessions[5][50] = {
e.
"Day 1: 10:00 AM - 11:30 AM: BCA Theory Session 1",
nc
"Day 2: 2:00 PM - 3:30 PM: BCA Theory Session 2",
ie
"Day 4: 3:00 PM - 4:30 PM: BCA Theory Session 4",
sc
"Day 5: 9:30 AM - 11:00 AM: BCA Theory Session 5"
g
};
in
char mcaTheorySessions[5][50] = {
rn
"Day 1: 9:00 AM - 10:30 AM: MCA Theory Session 1",
ea
};
ht
char bcaPracticalSessions[5][60] = {
in
"Day 3: 12:30 PM - 2:00 PM: BCA Practical Session 3",
.
co
"Day 4: 4:30 PM - 6:00 PM: BCA Practical Session 4",
e.
};
nc
char mcaPracticalSessions[5][70] = {
ie
"Day 1: 10:30 AM - 12:00 PM: MCA Practical Session 1",
sc
"Day 2: 2:00 PM - 3:30 PM: MCA Practical Session 2",
g
"Day 3: 11:30 AM - 1:00 PM: MCA Practical Session 3",
in
"Day 4: 3:30 PM - 5:00 PM: MCA Practical Session 4",
printf("\t%s\n", bcaTheorySessions[i]);
ht
} 6
in
printf("\t%s\n", mcaTheorySessions[i]);
.
co
}
e.
printf("\n BCA Practical Sessions:\n");
nc
for (int i = 0; i < 5; i++) {
printf("\t%s\n", bcaPracticalSessions[i]);
ie
}
g sc
printf("\n MCA Practical Sessions:\n");
in
for (int i = 0; i < 5; i++) {
printf("\t%s\n", mcaPracticalSessions[i]);
rn
}
ea
}
//l
void displayAcademicCouncillors() {
s:
in
printf("\n BCA Councillor: %s\n", bcaCouncillor);
.
co
printf("\n MCA Councillor: %s\n", mcaCouncillor);
e.
nc
void displayAssignmentSchedules() {
ie
// Assuming the assignment schedules are stored in arrays
sc
char bcaAssignments[3][100] = {
g
"Assignment 1: Due on 2023-08-10",
in
"Assignment 2: Due on 2023-08-20",
char mcaAssignments[2][100] = {
//l
};
ht
in
printf("\t%s\n", bcaAssignments[i]);
.
co
}
e.
printf("\n MCA Assignments:\n");
nc
for (int i = 0; i < 2; i++) {
printf("\t%s\n", mcaAssignments[i]);
ie
}
sc
}
g
in
int main() {
int choice;
rn
do {
ea
printf("\n 6) Quit\n");
scanf("%d", &choice);
. in
co
switch (choice) {
case 1:
e.
displayGeneralInformation();
nc
break;
case 2:
ie
displayActivatedPrograms();
sc
break;
g
case 3:
in
displaySessionSchedules();
break;
rn
case 4:
ea
displayAcademicCouncillors();
break;
//l
case 5:
s:
displayAssignmentSchedules();
tp
break;
ht
case 6: 10
default:
in
printf("\n Invalid choice. Please enter a valid option.\n");
.
co
break;
e.
} while (choice != 6);
nc
return 0;
ie
}
sc
Screenshots of Output:
g
in
rn
ea
//l
s:
tp
ht
11
12
13
14
15
16
ie
sc
Learning Science
g
https://learningscience.co.in
in Thank You
rn
ea
//l
s:
tp
ht
17