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
What is the main difference between calloc () and malloc ()?
Explain what is the difference between far and near ?
Write a program to check palindrome number in c programming?
write a program for the normal snake games find in most of the mobiles.
Array is an lvalue or not?
Explain the bubble sort algorithm.
what are enumerations in C
Discuss the function of conditional operator, size of operator and comma operator with examples.
How can you call a function, given its name as a string?
Explain how can I pad a string to a known length?
Can two or more operators such as and be combined in a single line of program code?
What is the explanation for the dangling pointer in c?
How can I call fortran?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
What is the use of define in c?