for example user gives input as " 20 or 20.0 or rs 20.0 or
20.00 or rs20 and so .. on " and the output should be
stored as " rs.20.00 " in a variable

Answers were Sorted based on User's Feedback



for example user gives input as " 20 or 20.0 or rs 20.0 or 20.00 or rs20 and so .. on " ..

Answer / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
float i;
printf("enter the value :");
scanf("%f",&i);
printf("the output is : %f",i);
getch();
}

thank u. please make ur question more clear

Is This Answer Correct ?    2 Yes 1 No

for example user gives input as " 20 or 20.0 or rs 20.0 or 20.00 or rs20 and so .. on " ..

Answer / aditya

#include<stdio.h>
#include<conio.h>
void main()
{
string ss;
printf("enter the value :");
scanf("%s",&ss);
printf("the output is : %s",ss);
getch();
}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.

3 Answers   SilverKey,


how to write a prog in c to convert decimal number into binary by using recursen function,

1 Answers  


What is 1d array in c?

0 Answers  


in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

11 Answers   IBM,


What is a pointer value and address in c?

0 Answers  






What does %2f mean in c?

0 Answers  


What is #line in c?

0 Answers  


write a c program to accept a given integer value and print its value in words

4 Answers   Vernalis, Vernalis Systems,


write a program to display all prime numbers

0 Answers  


What is the right type to use for boolean values in c? Is there a standard type?

0 Answers  


write a program for 7*8 = 56 ? without using * multiply operator ? output = 56

6 Answers   Xavient,


Is this program statement valid? INT = 10.50;

0 Answers  


Categories