adspace


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

i have a written test for microland please give me test pattern

2816


develop algorithms to add polynomials (i) in one variable

2269


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2522


What is the general form of a C program?

1107


The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?

1364


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

1307


What are compound statements?

1301


Do you know the difference between malloc() and calloc() function?

1144


How do you convert strings to numbers in C?

1351


Is int a keyword in c?

1067


What is pointer to pointer in c with example?

1205


write a program to find out prime number using sieve case?

2182


In C programming, how do you insert quote characters (‘ and “) into the output screen?

1625


Differentiate between null and void pointers.

1270


write a progrmm in c language take user interface generate table using for loop?

2129