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
bitwise operations
sume of diagonal v.1
c
19_1
PRACTICE FINAL 2
BSEARCH() WITH STRUCT
lab pro v.05
C code to compare two texts in form of array of chars ignoring the capitalization
CO Assignment 1 Question 2
bit shift and mask