online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <string.h> int main() { char ch = 'F'; char text[] = "Zmienna ch zawiera litere: "; // putchar for (int i=0; i<strlen(text); i++) { putchar(text[i]); } putchar(ch); putchar('\n'); // new line // printf printf("Zmienna ch zawiera litere: %c\n", ch); printf("%s%c - kod ascii: %d, %i", text, ch, ch, ch); printf("\n\n"); char s[5]; // scanf printf("[scanf] Wpisz slowo: pasja\n"); scanf("%s", s); // Clearing The Input Buffer In C/C++ // https://www.geeksforgeeks.org/clearing-the-input-buffer-in-cc/ while ((getchar()) != '\n'); // getchar printf("[getchar] Wpisz ponownie slowo: pasja\n"); char g = getchar(); printf("\n"); printf("[scanf]: %s\n", s); printf("[getchar]: %c", g); return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue