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 are the features of the c language?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
What is the use of parallelize in spark?
Explain the difference between call by value and call by reference in c language?
Is a house a shell structure?
What is the value of uninitialized variable in c?
How do I send escape sequences to control a terminal or other device?
What is function prototype in c language?
What is switch in c?
Why we use conio h in c?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
How can you invoke another program from within a C program?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.