C Quick Refresher

Introduction
Good Programming starts from understanding the existing programs. This is the key reasons, many leading IT companies conduct a "Find the Output" related questions, to easily understand the knowledge level of the candidates.

This chapter is having about 20 such Find the Output questions, most of them are picked from interview questions, and covers all the important concepts like Strings, if, for, while etc.

A sample program is given below:

What is the output of the following program?
int main()
{
int a, b, c;
a = 10;
b = 20;
c = a*a + b*b;
c = c * a * b - a - b;

printf("%d", c);
}


Student
Karthikeyan   04-Sep-21

what is the different in int and long sir

Support Team
Support Team   06-Sep-21

int has 32 bit, and long has 64 bits size to store data. similarly, int has 4 bits for storing data but long has 8 bits for storing data. The memory required to hold the value of type int is less as compared to long.
REPLY

Student
LIBIN SHARMA   28-May-23

Int has 32 bit or 4 bit . Please confirm the value