Thông tin

Tác giả Arthur van Stratum
Hạn chót Không có hạn chót
Giới hạn nộp bài Không có giới hạn
Các tag chuyên mục level1, s2, category_string

Tags

Đăng nhập

[S2] Reading arguments

When you execute a C program, its function main() is called with, as parameters, the name of the program and the arguments after the executable's name.

The signature of the main() function must be the following :

int main(int argc, char **argv)

Write a complete C program containing a main. Your program should print one argument out of two (starting with the first), and return 0. Each argument shall be separated by a space, and the output shall be terminated by a new line just after the last argument printed (so without any additional space). Don't forget the required includes for your program.

Example :

./myProg a b c d e f g
a c e g