-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.basic-chars.c
29 lines (20 loc) · 735 Bytes
/
2.basic-chars.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>
void main() {
//Character pointer..
//char *charptr;
//Integer pointer..
//int *intptr;
//Declaring multiple pointers in a single line...
//int *ptr1 *ptr2;
// %d is the int value of the varibles which will result in 50.
{
char a = '2';
char b = 50;
printf("Character a is %d .\n Character b is %d .\n",a,b);
}
// Here we have made use of minimum scopes using { } which similar to that of a subshell. REASON:- We needed to use a and b same variables again within the same .c file hence had to do it.
// Checkout https://stackoverflow.com/questions/45387465/how-to-undeclare-delete-variable-in-c for more information.
char a = '2';
char b = 50;
printf("Character a is %c .\n Character b is %c .\n",a,b);
}