LOVE QUOTES FLOWER, hd wallpaper, quotes wallpaper, nice wallpaper, wallpaper 2013, best wallpaper, nature wallpaper, nature wallpaper 2013
Adsense responsive
Recent Post below header
Sunday 28 April 2013
LOVE QUOTES FLOWER WALLPAPER HIGH DEFINITION
LOVE QUOTES FLOWER, hd wallpaper, quotes wallpaper, nice wallpaper, wallpaper 2013, best wallpaper, nature wallpaper, nature wallpaper 2013
Saturday 27 April 2013
Friday 26 April 2013
Tuesday 23 April 2013
Monday 22 April 2013
Sunday 21 April 2013
Saturday 20 April 2013
Thursday 18 April 2013
Friday 12 April 2013
C PROGRAM: TO PASS STRUCTURE TO A FUNCTION AS ARGUMENT USING POINTER
CODING:
#include<conio.h>
#include<stdio.h>
struct stud_record
{
char name[25];
char cls[5];
int roll_no;
};
struct stud_record fun(struct stud_record *p);
void main()
{
struct stud_record student,*s;
clrscr();
s=&student;
fun(s);
printf("RECORD ENTERED\nName: %s\n",s->name);
printf("Class: %s",s->cls);
printf("\nRoll no. %d",s->roll_no);
getch();
}
struct stud_record fun(struct stud_record *p)
{
printf("Enter name: ");
scanf("%s",p->name);
printf("Enter class: ");
scanf("%s",p->cls);
printf("Enter roll no.: ");
scanf("%d",&p->roll_no);
printf("\n\n");
}
#include<conio.h>
#include<stdio.h>
struct stud_record
{
char name[25];
char cls[5];
int roll_no;
};
struct stud_record fun(struct stud_record *p);
void main()
{
struct stud_record student,*s;
clrscr();
s=&student;
fun(s);
printf("RECORD ENTERED\nName: %s\n",s->name);
printf("Class: %s",s->cls);
printf("\nRoll no. %d",s->roll_no);
getch();
}
struct stud_record fun(struct stud_record *p)
{
printf("Enter name: ");
scanf("%s",p->name);
printf("Enter class: ");
scanf("%s",p->cls);
printf("Enter roll no.: ");
scanf("%d",&p->roll_no);
printf("\n\n");
}
CODING |
OUTPUT |
For any query or suggestion please comment below...
C PROGRAM: TO PRINT STUDENT RECORD USING STRUCTURE POINTER
CODING:
#include<conio.h>
#include<stdio.h>
struct stud_record
{
char name[25];
char cls[5];
int roll_no;
};
void main()
{
struct stud_record student,*s;
clrscr();
s=&student;
printf("Enter name: ");
scanf("%s",s->name);
printf("Enter class: ");
scanf("%s",s->cls);
printf("Enter roll no.: ");
scanf("%d",&s->roll_no);
printf("\n\n");
printf("RECORD ENTERED\nName: %s\n",s->name);
printf("Class: %s",s->cls);
printf("\nRoll no. %d",s->roll_no);
getch();
}
#include<conio.h>
#include<stdio.h>
struct stud_record
{
char name[25];
char cls[5];
int roll_no;
};
void main()
{
struct stud_record student,*s;
clrscr();
s=&student;
printf("Enter name: ");
scanf("%s",s->name);
printf("Enter class: ");
scanf("%s",s->cls);
printf("Enter roll no.: ");
scanf("%d",&s->roll_no);
printf("\n\n");
printf("RECORD ENTERED\nName: %s\n",s->name);
printf("Class: %s",s->cls);
printf("\nRoll no. %d",s->roll_no);
getch();
}
CODING |
OUTPUT |
For any query or suggestion please comment below...
Wednesday 10 April 2013
Saturday 6 April 2013
Thursday 4 April 2013
Tuesday 2 April 2013
Subscribe to:
Posts (Atom)