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 will be the output:
main(){char ch;int a=10;printf("%d",ch);}

Answers were Sorted based on User's Feedback



what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / maruti

answer is some garbage value.
like in my case -53
becaus ch is not beeen initialized.
plz try n execute the programs before posting ur answers

Is This Answer Correct ?    1 Yes 0 No

what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / shruti

it will print the ascii value of the characters..
or some garbage values..

Is This Answer Correct ?    1 Yes 0 No

what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / vignesh1988i

garbage ascii value corresponding to the characterr present
in the memory location ch;

Is This Answer Correct ?    1 Yes 0 No

what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / manjot singh

It will gve a garbage value becoz ch has not value it will
automtically generate value by complier

Is This Answer Correct ?    1 Yes 0 No

what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / amala v

It'll give a warning tat "a is never used...If u Continue
executing...it will the memory address that is currently
used.

Is This Answer Correct ?    1 Yes 0 No

what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / lnk

In the above coding ...
there is a char "ch " assigned with out a value
and a int" a " assigned with a value ...
and it compiles to print a interger (%d) ...
but tries to read a int value fronm ch (which does not
match the data type ) so it gives garbage value .with
compile time warning !

Is This Answer Correct ?    1 Yes 0 No

what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / kalpana.y


There will be no output

because,in printf statement the integer variable is

declared but 'ch' is assinged.it should be 'a' insted
of 'ch'.

Is This Answer Correct ?    5 Yes 5 No

what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / raghu

I think it prints some garbage value. if ch was initialised
then it would have printed the ASCII value of that charecter

Is This Answer Correct ?    0 Yes 0 No

what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / uma

error. you cant get the answer

Is This Answer Correct ?    0 Yes 0 No

what will be the output: main(){char ch;int a=10;printf("%d",ch);}..

Answer / balaji

warning! "a" is assigned a value that is never used

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is header file definition?

0 Answers  


#include<stdio.h> main() {int i=1;j=1; for(;;) {if(i>5) break; else j+=1; printf("\n%d",j) i+=j; } }

7 Answers   HCL,


Why is c not oop?

0 Answers  


what is the first address that gets stored in stack according to a C or C++ compiler???? or what will be the first address that gets stored when we write a C source code????????

2 Answers   Apple,


C program to find all possible outcomes of a dice?

0 Answers  


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

0 Answers   HCL,


Can u please send me the exam pattern and also Previous papers to javed123go@gmail.com

0 Answers  


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

0 Answers  


What is the diffrent between while and do while statement ?

6 Answers  


What is static and volatile in c?

0 Answers  


ABCDCBA ABC CBA AB BA A A

4 Answers   TCS,


what is the basis for selection of arrays or pointers as data structure in a program

0 Answers   TCS,


Categories