Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the output of following program ?

int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
}

Answer Posted / krishna deep sharma

4,4,1
coz we shift the bit as 5=101 now shift two bit to right as
101>>2=001
now
2<<001=100
noe x=4
printf execute from right to left so ans is 4,4,1

Is This Answer Correct ?    11 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does main () mean in c?

1058


What are the functions to open and close file in c language?

1130


Describe the difference between = and == symbols in c programming?

1297


How can I change their mode to binary?

1050


What does typeof return in c?

1018


What are formal parameters?

1070


Explain how do you declare an array that will hold more than 64kb of data?

1398


how many key words availabel in c a) 28 b) 31 c) 32

1010


Define VARIABLE?

1105


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

1054


What is a program flowchart and explain how does it help in writing a program?

1225


What are the different types of constants?

1020


What are keywords c?

982


Explain how can a program be made to print the line number where an error occurs?

1148


What is the difference between text files and binary files?

1283