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
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
What is the use of define in c?
What is pointer & why it is used?
What is difference between main and void main?
Can a variable be both constant and volatile?
How do you do dynamic memory allocation in C applications?
What is the use of a ‘’ character?
writ a program to compare using strcmp VIVA and viva with its output.
What is nested structure in c?
What is multidimensional arrays
what are bit fields? What is the use of bit fields in a structure declaration?
How can I make sure that my program is the only one accessing a file?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
What are conditional operators in C?
What is the difference between call by value and call by reference in c?