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

What is the main difference between calloc () and malloc ()?

1095


Explain what is the difference between far and near ?

1047


Write a program to check palindrome number in c programming?

961


write a program for the normal snake games find in most of the mobiles.

2212


Array is an lvalue or not?

1065


Explain the bubble sort algorithm.

1003


what are enumerations in C

1105


Discuss the function of conditional operator, size of operator and comma operator with examples.

1095


How can you call a function, given its name as a string?

1098


Explain how can I pad a string to a known length?

1122


Can two or more operators such as and be combined in a single line of program code?

1308


What is the explanation for the dangling pointer in c?

1061


How can I call fortran?

990


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

1377


What is the use of define in c?

999