boost learn study
Showing posts with label
Pointer
.
Show all posts
Showing posts with label
Pointer
.
Show all posts
Monday, March 31, 2014
Pointer Program Using Function (Pass By Reference)
Home
�
C Pointers
�
Pointer Program Using Function (Pass By Reference)
/*Pointer Program Using Function (Pass By Reference) */ #include
#include
void main() { int a,b; void interchange(int *, int *); clrscr(); printf("Enter the Two No."); scanf("%d%d",&a,&b); interchange(a,b); getch(); } void interchange(int *x, int *y) { int t; t = *x; *x = *y; *y = t; printf("A=%d B=%d", *x,*y); }
Read more �
Pointer Program
Home
�
C Pointers
�
Pointer
#include
#include
void main() { int a,b; int *p,**t; a = 10; b = 30; p = & a; printf("\a = %d",a); /* 10 */ printf("\a = %u",&a); /* 4080 */ printf("\a = %d",*(&a)) ; /* 10 */ printf("\P = %u",p) ; /* 4080 */ printf("\P = %u",&p) ; /* 8080 */ printf("\P = %d",*p) ; /* 10 */ printf("\P = %d",*(&p)) ; /* 10 */ t = & p; printf("\T = %u",t) ; /* 8080 */ printf("\T = %u,&t) ; /* 2040 */ printf("\T = %u",*(&t)) ; /* 4080 */ printf("\T = %d",**(&t)) ; /* 10 */ printf("\T = %d",**t) ; /* 10 */ getch(); }
Read more �
Older Posts
Home
Subscribe to:
Posts (Atom)