Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

parte-b

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

void addIntStrings(char *n1, char *n2, char *res) {
    int value;

    value = atoi(n1) + atoi(n2);
    sprintf(res, "%d", value);
}

int main(void) {
    char a[100];
    char b[100];
    char res[100];
    
    scanf("%s", a); getchar();
    scanf("%s", b); getchar();
    
    addIntStrings(a, b, res);
    
    printf("%s\n", res);
    return 0;
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.