C
Programming and Technical
Programming
Output
void main()
{
float j;
j=1000*1000;
printf("%f",j);
}
Read Solution (Total 4)
-
- 1000000.000000
- 9 years agoHelpfull: Yes(12) No(0)
- 1000000.000000
because
floating-point types almost always give only an approximation to the correct value
that's why after decimal point 6-digits are printed which is fixed in c. - 7 years agoHelpfull: Yes(1) No(0)
- 1000000.000000
- 9 years agoHelpfull: Yes(0) No(0)
- i think printf("%f,&j"); is the corrct statement . so it gives compile error
- 9 years agoHelpfull: Yes(0) No(9)
C Other Question
integer i=0,j
while( i < 2 )
{
j = 0;
while ( j <= 3*i )
{
print j
print blank space
j = j + 3
}
print end-of-line //takes the cursor to the next line
i = i + 1
}
What will be the output of the program?
Given an array of non-negative integers. Find if the array can be sorted(ascending) in single swap of two numbers or not. ex1 :- A = [12,14,23,42,28,33,39,25,45] should return true. since swapping 42 and 25 will sort the array A. ex2 :- A = [12,14,23,42,28,33,22,25,45] should return false.