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 should the volatile modifier be used?
How is actual parameter different from the formal parameter?
What are run-time errors?
Describe wild pointers in c?
What does the characters “r” and “w” mean when writing programs that will make use of files?
What are pointers really good for, anyway?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is a function simple definition?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
Is boolean a datatype in c?
Explain what does the function toupper() do?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
How is a null pointer different from a dangling pointer?