#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 use of a static variable in c?

789


I heard that you have to include stdio.h before calling printf. Why?

814


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

2088


How can I change their mode to binary?

896


Why is c called c not d or e?

839


Explain how do you generate random numbers in c?

814


What are high level languages like C and FORTRAN also known as?

912


What is the difference between array and linked list in c?

868


What are formal parameters?

854


Write a program to check armstrong number in c?

854


Write a program to swap two numbers without using the third variable?

808


Differentiate between a structure and a union.

1014


What is the symbol indicated the c-preprocessor?

941


write a program fibonacci series and palindrome program in c

801


Write a program of advanced Fibonacci series.

895