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 S;
char S[6]= " HELLO";
printf("%s ",S[6]);

output of the above program ?
(0, ASCII 0, I,unpredictable)

Answer Posted / kiran kumar

For the Above Program u will get the Error as Conflictinf
types for S because you are declaring 2 variables of
different types one as char and another as char aray with
same names.

So, the compiler will be in Unpredicatable stage
variable name S to be consider for what type and it will
give Error as Confilctinf types for S.

Even if u replace any of the S with s then u will get the
Output of this Program as Segfault in Linux where as in
Windows u will get the HELLO.

To the Best of my Knowledge i Posted this Answer.
Let me Know if there is any better Clarifications.

My emai Id is kirjony@gmail.com

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When do we get logical errors?

1087


Why is void main used?

1045


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2649


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

1250


What is echo in c programming?

976


What is the difference between exit() and _exit() function?

1008


What is meant by errors and debugging?

1068


How to write a multi-statement macro?

996


What is the difference between #include

and #include “header file”?

981


What is fflush() function?

1089


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

2017


How variables are declared in c?

1001


can anyone please tell about the nested interrupts?

2076


How many types of arrays are there in c?

1011


Can 'this' pointer by used in the constructor?

1052