Q1. Write an interactive C program which prompts the user with the following options on the opening menu: 1) General Information of the Learner Support Centre(LSC) 2) Programmes activated in the study centre 3) Scheduling of theory/practical sessions for BCA-MCA programmes 4) Academic Councillor’s Details 5) Schedules for Assignment submissions for various programmes 6) Quit

, , No Comments

 Certainly! Below is a simple example of an interactive C program that provides a menu with the specified options. This program uses a switch-case structure to handle the user's choice.


```c

#include <stdio.h>


void displayGeneralInformation();

void displayProgrammes();

void displayScheduling();

void displayCouncillorDetails();

void displayAssignmentSchedules();


int main() {

    int choice;


    do {

        // Display menu

        printf("\nMain Menu\n");

        printf("1. General Information of the Learner Support Centre(LSC)\n");

        printf("2. Programmes activated in the study centre\n");

        printf("3. Scheduling of theory/practical sessions for BCA-MCA programmes\n");

        printf("4. Academic Councillor’s Details\n");

        printf("5. Schedules for Assignment submissions for various programmes\n");

        printf("6. Quit\n");


        // User prompt

        printf("\nEnter your choice (1-6): ");

        scanf("%d", &choice);


        // Process user choice

        switch (choice) {

            case 1:

                displayGeneralInformation();

                break;

            case 2:

                displayProgrammes();

                break;

            case 3:

                displayScheduling();

                break;

            case 4:

                displayCouncillorDetails();

                break;

            case 5:

                displayAssignmentSchedules();

                break;

            case 6:

                printf("Quitting the program. Goodbye!\n");

                break;

            default:

                printf("Invalid choice. Please enter a number between 1 and 6.\n");

        }


    } while (choice != 6);


    return 0;

}


void displayGeneralInformation() {

    printf("Displaying General Information of the Learner Support Centre(LSC)...\n");

    // Add relevant information here

}


void displayProgrammes() {

    printf("Displaying Programmes activated in the study centre...\n");

    // Add relevant information here

}


void displayScheduling() {

    printf("Displaying Scheduling of theory/practical sessions for BCA-MCA programmes...\n");

    // Add relevant information here

}


void displayCouncillorDetails() {

    printf("Displaying Academic Councillor’s Details...\n");

    // Add relevant information here

}


void displayAssignmentSchedules() {

    printf("Displaying Schedules for Assignment submissions for various programmes...\n");

    // Add relevant information here

}

```


In this example, each option is associated with a function that could display specific information. You can replace the placeholder code in each function with actual content based on your needs.

0 टिप्पणियाँ:

Post a Comment