what is the output of the following program?
#include<stdio.h>
void main()
{
float x=1.1;
while(x==1.1)
{
printf("\n%f",x);
x=x-0.1;
}
}
Answer Posted / vignesh1988i
for the first time the loop will be true and it will print as 1.100000 , after reading the next line x will be 1.0, so again when it comes into while loop 1.000000 not equal to 1.100000 so it will come outside the loop
Is This Answer Correct ? | 4 Yes | 20 No |
Post New Answer View All Answers
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
What are the advantages of using new operator as compared to the function malloc ()?
Explain what is a static function?
Linked lists -- can you tell me how to check whether a linked list is circular?
Explain high-order bytes.
What are the header files used in c language?
Are there namespaces in c?
What oops means?
Why is it important to memset a variable, immediately after allocating memory to it ?
How do you determine whether to use a stream function or a low-level function?
How many bytes are occupied by near, far and huge pointers (dos)?
Write a program to maintain student’s record. Record should
not be available to any unauthorized user. There are three
(3) categories of users. Each user has its own type. It
depends upon user’s type that which kind of operations user
can perform. Their types and options are mentioned below:
1. Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record)
2. Super Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record, Delete Single Record)
3. Guest
(Search Record [by Reg. No or Name], View All Records)
When first time program runs, it asks to create accounts.
Each user type has only 1 account (which means that there
can be maximum 3 accounts). In account creation, following
options are required:
Login Name: <6-10 alphabets long, should be unique>
Password: <6-10 alphabets long, should not display
characters when user type>
Confirm Password:
What is spark map function?
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.
What is the difference between a function and a method in c?