-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathex6.c
24 lines (21 loc) · 766 Bytes
/
ex6.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
#include <stdio.h>
int main(int argc, char *argv[])
{
int distance = 42;
float power = 2.345f;
double super_power = 56788.4532;
char initial = 'A';
char first_name[] = "Zed";
char last_name[] = "Shaw";
printf("You are %1$d, %1$x, %1$X, %1$o, %1$04X miles away.\n", distance);
printf("You have %f levels of power.\n", power);
printf("You have %f awesome super powers.\n", super_power);
printf("I have an initial %c.\n", initial);
printf("I have a first name %s.\n", first_name);
printf("pos of char: %p\n", &initial);
printf("pos of int: %p\n", &distance);
printf("pos of str: %p\n", &first_name);
printf("I have a last name %s.\n", last_name);
printf("My whole name is %s %c. %s.\n", first_name, initial, last_name);
return 0;
}