From 2ea2465e2030988bca618925d34cffad06cfdff9 Mon Sep 17 00:00:00 2001 From: saj006 <56358352+saj006@users.noreply.github.com> Date: Thu, 1 Oct 2020 21:03:20 +0530 Subject: [PATCH] Create saj006 please accept my pull request --- saj006 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 saj006 diff --git a/saj006 b/saj006 new file mode 100644 index 0000000..0b43c6a --- /dev/null +++ b/saj006 @@ -0,0 +1,28 @@ +#include + +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; +}