Quote:
what \e command means?
Looks like \e is a non standard escape sequence for the
Escape key.
Rules for C++ string literals escape character - Stack Overflow[
^]
Quote:
Can someone explain what will be printed on a screen if I type word grejanje
First, you can experiment and run the code with different inputs.
As I already told in your previous question, the debugger will show you what the code is doing, step by step. Give it a try.
Can someone explain me how did I get 5135311?[
^]
-----
Advice: Learn to indent properly your code, it show its structure and it helps reading and understanding. It also helps spotting structures mistakes.
#include <stdio.h>
void main()
{
char znak = ' ';
long brojac = 0;
while( znak != '\e' )
{
switch( znak = getch() )
{
case 'a' :
case 'e' :
case 'i' :
case 'o' :
case 'u' :
brojac++ ;
break;
default :
brojac--;
};
printf( "%i", brojac );
};
}
Indentation style - Wikipedia[
^]
Professional programmer's editors have this feature and others ones such as parenthesis matching and syntax highlighting.
Notepad++ Home[
^]
ultraedit[
^]