Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by mark ( 12 years ago )
3
#include<iostream>
#include<conio.h>
using namespace std;

int main()
{
 int a=25;
 int* b=&a;
 cout<<"The given variable is "<<a<<endl;
 cout<<"The value by means of the pointer is "<<*b;
 getch();
}

4
#include<iostream>
#include<conio.h>
using namespace std;

int main()
{
 int a[]={12345};
 int* b=a;
 cout<<*b<<endl;
 getch();
}

5
#include<iostream>
#include<conio.h>
using namespace std;

int main()
{
 char name[]="Mark Allen Chichioco";
 char* ptrname=name;
 cout<<name<<endl;
 cout<<ptrname<<endl;
 cout<<*name<<endl;
 cout<<&name;<<endl;
 cout<<&ptrname;<<endl;
 getch();
}

 

Revise this Paste

Your Name: Code Language: