Skip to main content

Write a program to get student information of 5 students using structure.

You are encouraged to post the screenshot of output in comment section.

Students information in the form of Roll No, Name, Marks.
You can modify the code as per the problem statement. 


#include<stdio.h>
#include<conio.h>
struct students
{
int rollno;
char name[15];
int marks;
}s[5];

int main()
{
 int i;
 clrscr();
 printf("Enter Student information\n");
 for(i=0;i<5;i++)
 {
  printf("Enter Roll No:\n");
  scanf("%d",&s[i].rollno);
  printf("Enter name\n");
  scanf("%s",&s[i].name);
  printf("Enter Marks:\n");
  scanf("%d",&s[i].marks);
}
 printf("Student information is \n");
 for(i=0;i<5;i++)
 {
  printf("\n==================\n");
  printf("%d",s[i].rollno);
  printf("\n------------------\n");
  printf("%s",s[i].name);
  printf("\n------------------\n");
  printf("%d",s[i].marks);
  printf("\n==================\n");
 }
 getch();
 return 0;

}

Comments

Popular posts from this blog

CloudSimSDN Compiling Issues

Hello, this is regarding issues such as Main class not found or Can not find symbol while executing or compiling. You just need to set proper path of your cloudsimsdn directory. I stored CloudSimSDN folder downloaded from github  at location E:\ with the name cloud. It's very much important to provide proper jar file's address as well as providing complete path of file that has to be inputed such as energy-physical.json.  Set Java path variable value:  C:\Program Files\Java\jdk1.8.0_121\bin CLASSPATH value : E:\cloud\jars\*; E:\cloud\src; For Compiling javac E:\cloud\src\org\cloudbus\cloudsim\sdn\example\ SDNExample.java For Executing java org.cloudbus.cloudsim.sdn.example.SDNExample MFF E:\cloud\dataset-energy\energy-physical.json E:\cloud\dataset-energy\energy-virtual.json E:\cloud\dataset-energy\energy-workload.csv > results.out These commmands are tested with Windows 10 and Latest java version. Please share your valuable comments and queries....

Parallel Computing

Parallel Computing- Its all about parallel thinking. Recent technologies, Various discussions, interesting facts about Parallel Computing & high-performance computing will be posted here very soon. ⇋  Stay Tuned Parallely ⇋ PDS Quiz 1 PDS_Quiz 2 PDS_Quiz3 PDS_Quiz 4 PDS_Quiz 5 Course Exit Survey 2019

MACRO DATABASE

Great to know that you are curious about the databases used in the MACRO Pass1 and Pass2. Here we Go.!!!!! Pass 1: Databases Source Program Output of Source Program to be fed to Pass 2 Macro Definition Table (MDT)- Stores Macro Definitions Macro Name Table(MNT) - Stores the Macro Name that are defined in the Program Macro Definition Table Counter (MDTC) - Indicates next available entry in MDT Macro Name Table Counter (MNTC) - Indicates next available entry in MNT Argument List Array (ALA)-  Stores the index markers for dummy arguments Pass 2: Databases Input Source Program Expanded Source Code i.e  Output for Assembler  Macro Definition Table (MDT)- Created and Maintained by Pass 1 Macro Name Table(MNT) -  Created and Maintained by Pass 1  Macro Definition Table Pointer (MDTP) - Indicate next line used in Expansion. Arguments List Arrays (ALA)- Substitutes arguments for index markers. Example       ...