#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 |
cavium networks written test pattern ..
write a programming in c language, 1 3 5 7 9 11
what does ‘segmentation violation’ mean?
Explain how can I prevent another program from modifying part of a file that I am modifying?
can we implement multi-threads in c.
Write a program to print fibonacci series using recursion?
What is the diffrent between while and do while statement ?
what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; a.9 b.8 c.6 d.7
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
code for selection sort?
How do I convert a string to all upper or lower case?
what is difference between array,strutter,union and pointers
3 Answers CTS, Lovely Professional University, Mannar Company,