plz answer.. a program that takes a string e.g. "345" and
returns integer 345

Answer Posted / swapnil chhajer

#include<stdio.h>
#include<stdlib.h>

int main()
{
char str[10];
printf("Enter the string : ");
gets(str);
printf("Converted integer : %d",atoi(str));
getchar();
}

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who developed c language and when?

590


What is a protocol in c?

562


For what purpose null pointer used?

610


the question is that what you have been doing all these periods (one year gap)

1626


how to find anagram without using string functions using only loops in c programming

2720






Which node is more powerful and can handle local information processing or graphics processing?

831


Why we not create function inside function.

1753


What will be your course of action for a push operation?

669


What is the scope of static variables in c language?

634


What is scanf () in c?

667


What is malloc calloc and realloc in c?

674


How are 16- and 32-bit numbers stored?

728


When should volatile modifier be used?

558


Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1429


Is c dynamically typed?

673