mirror of
				https://sourceware.org/git/glibc.git
				synced 2025-11-03 20:53:13 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			331 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			331 B
		
	
	
	
		
			C
		
	
	
	
	
	
#include <stdio.h>
 | 
						|
 | 
						|
int
 | 
						|
main (void)
 | 
						|
{
 | 
						|
  char *bp;
 | 
						|
  size_t size;
 | 
						|
  FILE *stream;
 | 
						|
 | 
						|
  stream = open_memstream (&bp, &size);
 | 
						|
  fprintf (stream, "hello");
 | 
						|
  fflush (stream);
 | 
						|
  printf ("buf = `%s', size = %d\n", bp, size);
 | 
						|
  fprintf (stream, ", world");
 | 
						|
  fclose (stream);
 | 
						|
  printf ("buf = `%s', size = %d\n", bp, size);
 | 
						|
 | 
						|
  return 0;
 | 
						|
}
 |