#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 sizeof int in c?
How can you tell whether two strings are the same?
What is NULL pointer?
Write a c program to demonstrate character and string constants?
What are different types of variables in c?
How can I recover the file name given an open stream or file descriptor?
What is sizeof int?
What are types of structure?
Can you return null in c?
In a switch statement, explain what will happen if a break statement is omitted?
What do the functions atoi(), itoa() and gcvt() do?
Can you subtract pointers from each other? Why would you?
Who invented bcpl language?
What is getch c?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.