Wipro
Company
Logical Reasoning
Coding Decoding
void main()
{
char *p=""s"Hello";
printf("%s",p);
}
what is the o/p?
a.sHello
b.s
c.Hello
d.error
Read Solution (Total 11)
-
- it will give an error
error: expected ',' or ';' before 's' - 9 years agoHelpfull: Yes(4) No(1)
- it will give Declaration syntax error
- 9 years agoHelpfull: Yes(4) No(0)
- its a declaration syntax error
- 9 years agoHelpfull: Yes(2) No(0)
- error.
you cant write a statement like that
" dssds"sds"dsds".
if you want to insert " " in middle of string use escape chracter.
ex. "abc"myname"def" - 9 years agoHelpfull: Yes(2) No(1)
- It will give error because we can't use double coats like used in the question for that we have to use commas (,).
So option d is correct. - 9 years agoHelpfull: Yes(2) No(0)
- in my previous answer i inserted escape character but html page replace it with its proper meaning.
if you want to insert " " into a string then use with escape.
put ' " '. - 9 years agoHelpfull: Yes(1) No(1)
- c hello print
- 9 years agoHelpfull: Yes(1) No(2)
- error
syntax error and also char not print the string - 8 years agoHelpfull: Yes(0) No(0)
- Error: expected ',' or ';' before 's'
- 8 years agoHelpfull: Yes(0) No(0)
- d.error
it will give error
- 8 years agoHelpfull: Yes(0) No(0)
- declaration error
- 8 years agoHelpfull: Yes(0) No(0)
Wipro Other Question