Value In Brief
All You Need To Know Explained In Brief

What is the difference between \r, \n, \t, and \f in C programming?

These aren’t unique to “C programming”. These are various “control characters”, originally used to control the write-head and paper feeder on Teletype machines. \n is “line feed”. This would bump up the paper one line, whatever that was, but not move the write head. If you did abc\ndef, the teletype would print abc def \r is “carriage return”. This would cause the write head to return to its leftmost position.

Comparing Two Integers in C Programming Language

Here is the code snippet in C programming language. #include <stdio.h> int main() { int a, b; a = 11; b = 99; // to take values from user input uncomment the below lines − // printf("Enter value for A :"); // scanf("%d", &a); // printf("Enter value for B :"); // scanf("%d", &b); if(a > b) printf("a is greater than b"); else printf("a is not greater than b"); return 0; }