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

char ch=10;printf("%d",ch);what is the output

Answer Posted / abdur rab

The output will be 10.

char consists of 1 byte = 8 bits

it can hold any value between 0 - 127
an unsigned char can hold any 0 - 256

the asci value 10 is newline,
so if u format it as char using %c
printf ( "\n|%c|", ch ); the 10 is converted to new line

otherwise if u format it to int using %d, it ud print 10

Is This Answer Correct ?    18 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the 4 types of programming language?

1054


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

1174


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

1005


How can I automatically locate a programs configuration files in the same directory as the executable?

1106


difference between object file and executable file

6644


Is c object oriented?

913


What is the size of structure pointer in c?

1019


What are the 3 types of structures?

982


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1020


C language questions for civil engineering

1656


What is 2c dna?

1023


Is flag a keyword in c?

1110


What is atoi and atof in c?

1031


Why is c called "mother" language?

1234


What is s in c?

1001