print example
This commit is contained in:
		@@ -1,10 +1,11 @@
 | 
				
			|||||||
#include "foo.h"
 | 
					#include "myprint.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main() {
 | 
					int main() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  foo();
 | 
					  myprint();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return 0;
 | 
					  return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										13
									
								
								c-basic/myprint.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								c-basic/myprint.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					#include "myprint.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int myprint() {
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					  int a = 10, b = 20;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  printf("a = %d, b = %d\n", a, b);
 | 
				
			||||||
 | 
					  printf("a = %d, b = %d\n", b, a);
 | 
				
			||||||
 | 
					  printf("%d%d\n", a, b);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										6
									
								
								c-basic/myprint.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								c-basic/myprint.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					#ifndef MYPRINT_H
 | 
				
			||||||
 | 
					#define MYPRINT_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int myprint();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
		Reference in New Issue
	
	Block a user