#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
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 |
Answer / raisa
character X and x should always be enclosed in single quotes
| Is This Answer Correct ? | 0 Yes | 0 No |
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 |
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
Where static variables are stored in c?
write a program to find the sum of the array elements in c language?
24 Answers ICT, Infosys, Wipro,
Explain what is the difference between far and near ?
What is || operator and how does it function in a program?
write a program to add two numbers of any size.....(remember any size)
What are the advantages of using new operator as compared to the function malloc ()?
What does do in c?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
What is floating point exception error? And what are different types of errors occur during compile time and run time? why they occur?
What are pointers really good for, anyway?
What is the Difference between Macro and ordinary definition?
3 Answers Bosch, Cognizant, College School Exams Tests, Motorola,