0

Letters and numbers?

why are we using int for both letters and numbers for example starting a project with int main()

15th Jul 2018, 2:07 PM
Nathan Maguire (GoodNate)
Nathan Maguire (GoodNate) - avatar
3 Respostas
+ 1
I don't really get what the question is, but "letters" are represented as an integer number in ASCII table so every character you write is seen as number for compiler. We start project with int main() because this is what compiler is looking for when it tries to execute our code. Why main function returns number? It returns 0 to tell that it ended successfuly and any other number says that program has ended with an error.
15th Jul 2018, 2:22 PM
Jakub Stasiak
Jakub Stasiak - avatar
0
main is a function. You will learn more about function as you progress. Remember at starting of a language you would have lot of queries but as you progress all your queries would be solved. Hope this helps☺️☺️.
15th Jul 2018, 2:18 PM
Meet Mehta
Meet Mehta - avatar
0
All programs start with main means your program will start execution from main function.
15th Jul 2018, 2:22 PM
Meet Mehta
Meet Mehta - avatar