Switch statement exists in C++
programming. Whenever we have to choose one set of instructions to be executed
from multiple set of instructions then switch statement is used. goto statement
is provided to jump to different instruction instead of moving to the next
instruction for execution.
Some I/O functions
Ofstream lets us direct the output of
the program to the printer. Ofstream device(device_name) is the syntax of the
command. get() and put() functions. get() is used to have the single character
input, by default it receives input from the keyboard. put() is used to direct
the single character output, by default the output is directed to the screen.
Buffered and unbuffered I/O
: buffer is memory allocation controlled by C++. When we provide input, it does
not directly go to the program rather the system waits for it till the Enter
key is pressed. getch() and putch() are the non-buffered input output
functions. Task of both these is same as the task get() and put() function do.
getch() received the input from the keyboard and putch() provides the output on
the screen. But the only difference is the getch() and putch() both are non-buffered
functions. getche() is the function that allows the input to be displayed on
the screen as the user types it.