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...

void main()
{
char c;
while(c=getchar()!='\n')
printf("%d",c);
}
o/p=11 why?

Answer Posted / deepshree sinha

the while loop is continue until the expression is not false.
when the expression is false that is when c='\n' it will come
out from the loop.then it will print c which is equal to '\n'
whose integer value is 11.so it will print 11.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain 'far' and 'near' pointers in c.

1186


What should malloc() do?

1219


What does the file stdio.h contain?

1119


When is the “void” keyword used in a function?

1579


What are the types of type qualifiers in c?

1140


What is a const pointer in c?

1179


What is getch?

1273


Describe explain how arrays can be passed to a user defined function

1164


What is structure packing in c?

1140


Explain the process of converting a Tree into a Binary Tree.

2724


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

1808


How are Structure passing and returning implemented by the complier?

1227


Differentiate between ordinary variable and pointer in c.

1252


Explain the difference between structs and unions in c?

1066


How to get string length of given string in c?

1121