#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 |
What is logical error?
Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: “jack and jill went up a hill” Return Value: “kcaj dna llij tnew pu a llih”
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
What is the difference between void main() and void main (void) give example programme?
What are derived data types in c?
how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......
Between macros and functions,which is better to use and why?
What are c header files?
How are Structure passing and returning implemented by the complier?
Can we change the value of #define in c?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
x=2,y=6,z=6 x=y==z; printf(%d",x)
13 Answers Bharat, Cisco, HCL, TCS,