My Name Is Salman Masood , I am Computer Science &Amp; Maths Graduate from University of Karachi, Pakistan , Teaching Is My Passion and My Aim Is to Deliver All My Knowledge among Those Students Who Can'T Afford Tutors or Expensive Institute Fees. I Will Be Keep Sharing My All Knowledge and Information with You .... Remember Me in Your Prayers !
Thursday, 18 January 2018
Learn C language Part 39 Structures in C language
#include <stdio.h>
#include <conio.h>
#include <string.h>
struct employee
{
int id ;
char name[50];
float salary;
char department[50] ;
};
main()
{
struct employee e1;
struct employee e2;
e1.id=101;
strcpy(e1.name,"Ali");
e1.salary=50000;
strcpy(e1.department,"HR");
//2ND RECORD..........................
e2.id=102;
strcpy(e2.name,"BILAL");
e2.salary=60000;
strcpy(e2.department,"IT");
//PRINTING........................
printf("Employee ID: %d\nName of Employee : %s \nSalary:%f\nDepatment: %s",e1.id,e1.name,e1.salary,e1.department);
printf("Employee ID: %d\nName of Employee : %s \nSalary:%f\nDepatment: %s",e2.id,e2.name,e2.salary,e2.department);
}
Subscribe to:
Post Comments (Atom)
Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC
Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...
-
Load event: pictureBox3.Image = Image .FromFile( @"C:\Users\salman\Documents\Visual Studio 2013\Projects\WindowsFormsApplication3\W...
No comments:
Post a Comment