RosettaCodeData/Task/Use-another-language-to-call-a-function/Python/use-another-language-to-call-a-function-2.py
2023-07-01 13:44:08 -04:00

22 lines
491 B
Python

#if 0
//I rewrote the driver according to good sense, my style,
//and discussion --Kernigh 15:45, 12 February 2011 (UTC).
#endif
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
extern int Query(char*,unsigned*);
int main(int argc,char*argv[]) {
char Buffer[1024], *pc;
unsigned Size = sizeof(Buffer);
if (!Query(Buffer,&Size))
fputs("Failed to call Query",stdout);
else
for (pc = Buffer; Size--; ++pc)
putchar(*pc);
putchar('\n');
return EXIT_SUCCESS;
}