string_is_number
| string_is_number | |
|---|---|
| Turn-in directory | 07_string_is_number/ |
| Files to turn in | string_is_number.c |
| Allowed external functions | None |
| Type of work | Function |
- Write a program which displays the alphabet based on the starting character in variable
start_char, followed by a newline. Use the following rules: - To help you get started, we will provide some code for you to copy/paste/edit. Make sure you understand every line before you hand it in! #TODO SUBJECT HERE
#include <stdio.h> int string_is_number(const char* str); int main() { const char *hello = "Hello"; const char *number = "123"; int result = string_is_number(hello); printf("%d\n", result); result = string_is_number(number); printf("%d\n", result); return 0; }
Example output:
$ ./a.out
0$
1$