+ 6

Why do we use functions?

i completed the functions lesson in C++ course and still dont get why do we actually use it. i hope that someone helps me with examples too❤

17th Apr 2018, 1:53 PM
Jaafer Hazim
Jaafer Hazim - avatar
4 Respostas
+ 5
It helps in simplifying the code.... The main uses are reusability and abstraction. Tell me if you didn't get it 😊
17th Apr 2018, 2:18 PM
Karan Kumar
Karan Kumar - avatar
+ 5
Jaafer Hazim You can reuse functions any number of times by calling them to the main method. If there were no functions you would have to write that part of code again and again which would be time consuming....
17th Apr 2018, 5:42 PM
Karan Kumar
Karan Kumar - avatar
+ 2
To make the piece of code reusable we use functions.It reduces the code complexity and if we use functions it will be readable
18th Apr 2018, 8:13 AM
Madhu Patil
Madhu Patil - avatar
+ 1
Karan Kumar didnt get it😅
17th Apr 2018, 2:51 PM
Jaafer Hazim
Jaafer Hazim - avatar