You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

579 B

strlenprog

Instructions

  • Write a program that counts the characters of a string and that returns that value.

  • If the program receives more than one or no arguments it must not print anything.

Expected output :

student@ubuntu:~/piscine-go/strlenprog$ go build
student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello" | cat -e
5$
student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog
student@ubuntu:~/piscine-go/strlenprog$
student@ubuntu:~/piscine-go/strlenprog$ ./strlenprog "hello" "how are you"
student@ubuntu:~/piscine-go/strlenprog$