Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
String manipulation
#include <stdio.h> #define SIZE 30 int main(void) { // my array for the string char myString[SIZE]; int stringLength = 0; int i = 0; printf("Example program for some string manipulations.\n"); // First read in an input string if (fgets(myString, SIZE, stdin)) { //give it an array of characters, maximum size it can accept, where you want to get it from while (myString[i] != 0) { 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
My first reevers C 2darryp
B_141128_MatrizProducto
Simple Calculator v1.0
Assignment 5 part 2 v2
Numero de veces digito
Primes in binary
Program to calculate characters
ques4
asasas
ATM