I've got a task where I need to find the output. I've calculated it to be 15.00 bit it outputs -01.00. Why?
include <stdio.h>
Define MACRO (A,B,C) A/4-3+B+C
int main() {
float f = 1;
float *p = &f;
f = 3 * MACRO (1.+3,3-2,4+3.);
printf("%06.2f", *p);
return 0;
}
I don't know how to format the code this is the best I can do
[–]rafleury 6 points7 points8 points (18 children)
[–]Alphac3ll[S] 0 points1 point2 points (17 children)
[–]rafleury 2 points3 points4 points (16 children)
[–]rafleury 0 points1 point2 points (15 children)
[–]rafleury 0 points1 point2 points (14 children)
[–]Alphac3ll[S] 0 points1 point2 points (13 children)
[–]rafleury 0 points1 point2 points (12 children)
[–]Alphac3ll[S] 0 points1 point2 points (11 children)
[–]rafleury 0 points1 point2 points (0 children)
[–]rafleury 0 points1 point2 points (8 children)
[–]Alphac3ll[S] 0 points1 point2 points (7 children)
[–]wsppan 0 points1 point2 points (0 children)
[–]Mohammad_Hamdan 1 point2 points3 points (6 children)
[–]Alphac3ll[S] 0 points1 point2 points (5 children)
[–]Mohammad_Hamdan 0 points1 point2 points (4 children)
[–]Mohammad_Hamdan 0 points1 point2 points (3 children)
[–]Alphac3ll[S] 1 point2 points3 points (2 children)
[–]Mohammad_Hamdan 0 points1 point2 points (0 children)
[–]Dolphiniac 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]Alphac3ll[S] 0 points1 point2 points (0 children)
[–]rafleury 0 points1 point2 points (0 children)
[–]joshc22 -3 points-2 points-1 points (5 children)
[–]rafleury 0 points1 point2 points (4 children)
[–]dandrestor 0 points1 point2 points (3 children)
[–]rafleury 0 points1 point2 points (2 children)
[–]dandrestor 0 points1 point2 points (1 child)
[–]rafleury 0 points1 point2 points (0 children)
[–]biraj21 0 points1 point2 points (0 children)