Use another language to call a function: Difference between revisions

→‎{{header|C}}: Delete redundant code. Add link to comment.
(→‎{{header|C}}: Delete redundant code. Add link to comment.)
Line 85:
 
=={{header|C}}==
This is a restatement of the problem, it is not a solution. Please remove it.
<lang c>#include <stdio.h>
 
extern int Query (char * Data, size_t * Length);
 
int main (int argc, char * argv [])
{
char Buffer [1024];
unsigned Size = sizeof (Buffer);
if (0 == Query (Buffer, &Size))
{
printf ("failed to call Query\n");
}
else
{
char * Ptr = Buffer;
while (Size-- > 0) putchar (*Ptr++);
putchar ('\n');
}
}</lang>
I rewrote the driver as
<lang c>#if 0
I rewrote the driver according to good sense, my style,
and discussion --Kernigh 15<http:45, 12 February 2011 (UTC)//xrl.us/bmxxhb>.
 
This is file main.c on Autumn 2012 ubuntu linux release.
Anonymous user