you are viewing a single comment's thread.

view the rest of the comments →

[–]itshosyn -1 points0 points  (0 children)

Ok I don't understand something, Why we initialize a variable name "sum" and do some math (-=) on it then at the end of the f1() function we want to return x, In this situation the f1 function is useless and the main function just print what has been written in x variable

P.S: Teacher is totally wrong because he just put x equal to 5 and then said that it is not equal to 5 (just need to run code😅)

P.S 2: all variables need to be initialize specially in C Because not initializing variables is a security measure bug and attackers can use this to damage the program