Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


#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



#include <stdio.h> int main() { if ("X" <"x") printf("X sma..

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

#include <stdio.h> int main() { if ("X" <"x") printf("X sma..

Answer / raisa

character X and x should always be enclosed in single quotes

Is This Answer Correct ?    0 Yes 0 No

#include <stdio.h> int main() { if ("X" <"x") printf("X sma..

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

Post New Answer

More C Interview Questions

cavium networks written test pattern ..

0 Answers   Cavium Networks,


write a programming in c language, 1 3 5 7 9 11

2 Answers   NIIT,


what does ‘segmentation violation’ mean?

1 Answers  


Explain how can I prevent another program from modifying part of a file that I am modifying?

0 Answers  


can we implement multi-threads in c.

0 Answers  


Write a program to print fibonacci series using recursion?

0 Answers  


What is the diffrent between while and do while statement ?

6 Answers  


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

4 Answers   TCS,


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.

0 Answers  


code for selection sort?

1 Answers  


How do I convert a string to all upper or lower case?

0 Answers  


what is difference between array,strutter,union and pointers

3 Answers   CTS, Lovely Professional University, Mannar Company,


Categories