Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions saj006
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <stdio.h>

int main()
{
//char variable
char ch;

//char pointer
char *pCh;

/* Initializing pointer variable with the
* address of variable ch
*/
pCh = &ch;

//Assigning value to the variable ch
ch = 'A';

//access value and address of ch using variable ch
printf("Value of ch: %c\n",ch);
printf("Address of ch: %p\n",&ch);

//access value and address of ch using pointer variable pCh
printf("Value of ch: %c\n",*pCh);
printf("Address of ch: %p",pCh);

return 0;
}