Computer Science, asked by sravyamacherla08, 2 months ago

write a program to accept the student details (name, roll no, father name and mother name) and display the same (QBasic program)

Answers

Answered by harekrishna2all
0

In C language-:

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main()

{

          string  name[45];

          int rn;

         string father[45];

          string mother[45];

          printf("Enter your name: ");

          scanf("%s", name);

          printf("Enter your roll no: ");

          scanf("%d", &rn);

          printf("Enter your father's name: ");

          scanf("%s", father);

         printf("Enter your mother's name: "):

         scanf("%s", mother);

         printf("Which operating system are u using\n\n\n1)Windows\n2)Linux/Mac\n*Note you have to enter number\n\n");

         int OS;

       if(OS == 1)

        {

              system("cls");

        }

      else{

                  system("clear");

          }

printf("name: %s\n\nroll number: %d\n\nFather's name: %s\n\nMother's name: %s", name, rn, father, mother);

}

Similar questions