#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..

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best way to store flag values in a program?

578


What is pointer in c?

736


What is hashing in c language?

611


How is a structure member accessed?

582


What is local and global variable in c?

614






What are runtime error?

623


Under what circumstances does a name clash occur?

687


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

612


What’s a signal? Explain what do I use signals for?

603


Are the variables argc and argv are local to main?

784


What is meant by operator precedence?

670


How do you search data in a data file using random access method?

830


What is bubble sort technique in c?

588


What is FIFO?

668


How does placing some code lines between the comment symbol help in debugging the code?

544