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
Why we write conio h in c?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
in linking some of os executables are linking name some of them
Tell me the use of bit field in c language?
What is difference between class and structure?
Is malloc memset faster than calloc?
What is break in c?
What is preprocessor with example?
What does c mean before a date?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
What are c preprocessors?
How many types of operator or there in c?
what is the difference between 123 and 0123 in c?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.