How is function itoa() written in C?
Submitted by: Administrator#include<stdlib.h>
#include<stdio.h>
int main()
{
int n = 6789;
char p[20];
itoa(n,s,10);
printf("n=%d,s=%s",n,s);
return 0;
}
Submitted by: Administrator
#include<stdio.h>
int main()
{
int n = 6789;
char p[20];
itoa(n,s,10);
printf("n=%d,s=%s",n,s);
return 0;
}
Submitted by: Administrator
char buff[10];
int num_to_be_converted;
scanf("%d", &num_to_be_converted);
itoa(num_to_be_converted, buff, 10);
/* 10 is the base to be converted. it can range from 2 to 32 ..*/
The converted result is stored in string buff.
Submitted by: Aditya
int num_to_be_converted;
scanf("%d", &num_to_be_converted);
itoa(num_to_be_converted, buff, 10);
/* 10 is the base to be converted. it can range from 2 to 32 ..*/
The converted result is stored in string buff.
Submitted by: Aditya
Read Online Embedded Systems Job Interview Questions And Answers
Top Embedded Systems Questions
☺ | Explain What is forward reference w.r.t. pointers in c? |
☺ | Explain What is the difference between embedded systems and the system in which RTOS is running? |
☺ | Explain What happens when recursion functions are declared inline? |
☺ | Explain What are the features different in pSOS and vxWorks? |
☺ | Explain What are different qualifiers in C? |
Top PC Hardware Categories
☺ | Motherboard Interview Questions. |
☺ | Basic Computer Interview Questions. |
☺ | Embedded Systems Interview Questions. |
☺ | A + (Plus) Hardware Interview Questions. |
☺ | Computer Architecture Interview Questions. |