What is the output for the below program?
void main()
{
float me=1.1;
double you=1.1;
if(me==you)
printf("love c");
else
printf("know c");
}
Answers were Sorted based on User's Feedback
Answer / revathi pawar
know c is the answer because float and double r not same
the memory allocation differs so know c will b printed
| Is This Answer Correct ? | 10 Yes | 2 No |
Answer / anuradha
know c because do not compare float and double values
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / sangeetha
the answer for the above code will be know c because else
part is printed because float and double is not same
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / smartmove
Correction in last answer:
float me=1.1 it stores like 1.0999
double you=1.09999999
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / kalyan chukka
The Answer is Know c Because float having 7 digit numbers
and double having 15 digit number
float me=1.1 it stores like 0.99999
double you=1.099999999
so the Correct Answer is Know C
| Is This Answer Correct ? | 3 Yes | 1 No |
Do you know what is a programing language ?
wap in c to accept n number display the highest and lowest value
How does pointer work in c?
Explain how do you determine a file’s attributes?
I need testPalindrome and removeSpace #include <stdio.h> #define SIZE 256 /* function prototype */ /* test if the chars in the range of [left, right] of array is a palindrome */ int testPalindrome( char array[], int left, int right ); /* remove the space in the src array and copy it over to the "copy" array */ /* set the number of chars in the "copy" array to the location that cnt points t */ void removeSpace(char src[], char copy[], int *cnt); int main( void ) { char c; /* temporarily holds keyboard input */ char string[ SIZE ]; /* original string */ char copy[ SIZE ]; /* copy of string without spaces */ int count = 0; /* length of string */ int copyCount; /* length of copy */ printf( "Enter a sentence:\n" ); /* get sentence to test from user */ while ( ( c = getchar() ) != '\n' && count < SIZE ) { string[ count++ ] = c; } /* end while */ string[ count ] = '\0'; /* terminate string */ /* make a copy of string without spaces */ removeSpace(string, copy, ©Count); /* print whether or not the sentence is a palindrome */ if ( testPalindrome( copy, 0, copyCount - 1 ) ) { printf( "\"%s\" is a palindrome\n", string ); } /* end if */ else { printf( "\"%s\" is not a palindrome\n", string ); } /* end else */ return 0; /* indicate successful termination */ } /* end main */ void removeSpace(char src[], char copy[], int *cnt) { } int testPalindrome( char array[], int left, int right ) { }
True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type
What is pass by reference in c?
What is C++
What is the Lvalue and Rvalue?
what is compiler
write a program to check whether a given integer is a strong number or not? [Hint: 145=1!+4!+5! =1+24+120 =145]
what is the advantage of using SEMAPHORES to ORDINARY VARIABLES???