#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
What is the use of a static variable in c?
I heard that you have to include stdio.h before calling printf. Why?
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)
How can I change their mode to binary?
Why is c called c not d or e?
Explain how do you generate random numbers in c?
What are high level languages like C and FORTRAN also known as?
What is the difference between array and linked list in c?
What are formal parameters?
Write a program to check armstrong number in c?
Write a program to swap two numbers without using the third variable?
Differentiate between a structure and a union.
What is the symbol indicated the c-preprocessor?
write a program fibonacci series and palindrome program in c
Write a program of advanced Fibonacci series.