#include <stdio.h>
int main()
{
if ("X" <"x")
printf("X smaller than x
");
}


my question is whats the mistake in this program? find it and please tell me..

Answers were Sorted based on User's Feedback



#include <stdio.h> int main() { if ("X" <"x") printf("X sma..

Answer / sandeep

Friend
In c if we write string constants like "Hi" "Hello world"
etc,it will be just a poiinter unless u prints it.
So if pointer pointing "X" is greater "if will not be executed"
else if pointer pointing "x" is greater "if will be executed"

Is This Answer Correct ?    2 Yes 1 No

#include <stdio.h> int main() { if ("X" <"x") printf("X sma..

Answer / raisa

character X and x should always be enclosed in single quotes

Is This Answer Correct ?    0 Yes 0 No

#include <stdio.h> int main() { if ("X" <"x") printf("X sma..

Answer / preethi

#include <stdio.h>
void main()
{
int X,x;
if (X <x)
printf("X smaller than x");
}

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C Interview Questions

how to copy a string without using c function

5 Answers  


Why cant I open a file by its explicit path?

0 Answers  


How can you draw circles in C?

0 Answers   Accenture,


What is oops c?

0 Answers  


What is a global variable in c?

0 Answers  






How to implement variable argument functions ?

1 Answers   HP,


What is variable in c with example?

1 Answers  


What is enumerated data type in c?

0 Answers  


#include <stdio.h> int main ( int argc, char* argv [ ] ) { int value1 = 10; int value2 = 5; printf ( "\n The sum is :%d", value1 | value2 ); } This is the answer asked by some one to add two numbers with out using arithmetic operator?Yes this answer is write it given out put as 15.But how????? what is need of following line? int main ( int argc, char* argv [ ] ) how it work?what is the meaning for this line? please explain me.Advance thanks

9 Answers   Excel,


What is difference between far and near pointers?

0 Answers  


i have a written test for microland please give me test pattern

0 Answers   Microland,


What are the modifiers available in c programming language?

0 Answers  


Categories