What is the result
main()
{
char c=-64;
int i=-32
unsigned int u =-16;
if(c>i){
printf("pass1,");
if(c<u)
printf("pass2");
else
printf("Fail2");}
else
printf("Fail1);
if(i<u)
printf("pass2");
else
printf("Fail2")
}
a)Pass1,Pass2
b)Pass1,Fail2
c)Fail1,Pass2
d)Fail1,Fail2
e)none
Answer Posted / bishnu agrawal
it is an error bcoz u can assing a signed value to unsigned variable so answer is null
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Can you explain the four storage classes in C?
Are the variables argc and argv are always local to main?
What is the difference between variable declaration and variable definition in c?
What are the uses of a pointer?
Explain can static variables be declared in a header file?
What is scope rule of function in c?
What are predefined functions in c?
what are # pragma staments?
Why can’t we compare structures?
What is the purpose of void pointer?
What is function in c with example?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.
By using C language input a date into it and if it is right?
Why doesnt this code work?