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
When do we get logical errors?
Why is void main used?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
What is a program flowchart and explain how does it help in writing a program?
What is echo in c programming?
What is the difference between exit() and _exit() function?
What is meant by errors and debugging?
How to write a multi-statement macro?
What is the difference between #include
What is fflush() function?
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.
How variables are declared in c?
can anyone please tell about the nested interrupts?
How many types of arrays are there in c?
Can 'this' pointer by used in the constructor?