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

Explain b+ tree?

855


How can I sort a linked list?

830


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

866


What does c mean before a date?

878


Explain can the sizeof operator be used to tell the size of an array passed to a function?

833


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

1940


What the different types of arrays in c?

849


Explain how can I write functions that take a variable number of arguments?

832


What is pointers in c with example?

833


Where static variables are stored in c?

830


Multiply an Integer Number by 2 Without Using Multiplication Operator

572


Explain what does it mean when a pointer is used in an if statement?

858


What is sizeof array in c?

812


What is difference between structure and union with example?

851


How do I send escape sequences to control a terminal or other device?

865