Coding Simulation - Even/Odd

Write a program to check if the given number is even or odd

If the given input is 4, the STDOUT has to 1 else it has to be 0

Notes

argc(argument count) stores the number of the arguments passed to the main function

argv(argument vector) stores the array of the one-dimensional array of strings.

argv[0] - the filename, argv[1] - first argument, argv[2] - second argument


For example
./excutablefile 23 45
argv[0] - ./excutablefile
argv[1] - 23
argv[2] - 45


atoi(str) converts the string argument str to an integer (type int)

For more details on command line programming watch the following video-

Command Line Arguments for TCS NQT

This video gives a run through of how to use command line arguments in programming to take input from terminal

Output
# Testcase Input Output Success
1 Public 14

-

-

2 Private Hidden Hidden

-

3 Private Hidden Hidden

-

# Testcase
1 Public
Input - 14
Output : -
-
2 Private
Input - Hidden
Output : hidden
-
3 Private
Input - Hidden
Output : hidden
-