The output should be "the wallet belongs to Warren Buffett with balance of 85500000000" but I am getting "The wallet belongs to Warren Buffett with balance of 0.000000". Can you please let me know where am I making the mistake?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char *owner;
long double balance;
} Wallet;
int main(int argc, char **argv) {
const char *owner = "Warren Buffett";
Wallet *wallet = (Wallet *) malloc(sizeof(Wallet));
wallet->owner = (char *) malloc(strlen(owner) * sizeof(char));
strcpy(wallet->owner, "Warren Buffett");
wallet->balance = 85500000000;
printf("The wallet belongs to %s with balance of %Lf",
wallet->owner, wallet->balance);
return 0;
}