Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Day 2 String Manipulation
#include <stdio.h> #define SIZE 30 int main(void) { // my array for the string char myString[SIZE]; int stringLength; int i = 0; printf("Example program for some string manipulations.\n"); // First read in an input string if (fgets(myString, SIZE, stdin)) { while (myString[i] != 0) { i++; } stringLength = i; printf("Length of %s is %d", myString, stringLength); } else { printf("Error reading in the string!\n"); } return 0; }
run
|
edit
|
history
|
help
0
maximum_template
Assignment 4
domain.com
app1
Lab 11 v1.0
hello world
Minus pointer
swipe the numbers in cyclic way
a3
InterviewDesk_Embedded