Tuesday 6 April 2021

Poniter in C and C++ Qus 3

 #include<stdio.h>

#include<iostream.h>

#include<conio.h>

main()

{

clrscr();

int a=5,b=10;

int *p,*q;

q=&b;

p=q;

cout<<p<<endl;

cout<<q<<endl;

cout<<&a<<endl;

cout<<&b<<endl;

b=a;

cout<<a<<endl;

cout<<b<<endl;

cout<<*p<<endl;

cout<<*q<<endl;

getch();

return 0;

}

No comments:

Post a Comment