Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NOT a String in C - 2
//gcc 5.4.0 #include <stdio.h> #include <string.h> //For strlen function #define NOT = ~ int main(void) { const char* startString = "Hello World!"; int len = strlen(startString); char endString[len]; for (int i = 0; i < len; i++) { unsigned char currentByte = ~(unsigned char) startString[i]; endString[i] = currentByte; printf("%d \t",startString[i]); printf("%c \n",startString[i]); printf("%d \t",endString[i]); printf("%c \n",endString[i]); } printf("%s\n",startString); printf("%s\n",endString); return 0; }
run
|
edit
|
history
|
help
1
B_14118_RestasSucesivas
data types and printf
WHY_?
A_141121_factorial01
ㅇㅇㅇ
MatrixMul_shortxshort
A_141211_mayor
Hello world
18BCE2182 ASSESS_1 Q1-7
Largest and smallest