Advertisement
Niloy007

Pointer and Function

Jul 5th, 2020
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.89 KB | None | 0 0
  1. #include<stdio.h>
  2. // Function
  3.  
  4. // Function declaration
  5. // return_type functionName(parameter) {
  6.  
  7. // }
  8.  
  9. // void hello() {
  10. //     printf("Hello world\n");
  11. // }
  12.  
  13. // int main() {
  14. //  hello();
  15. //     printf("Hi everybody\n");
  16. // }
  17.  
  18.  
  19. // Global variable and Local variable
  20.  
  21. // int result = 0;
  22.  
  23. // Void kono value return kore na!
  24. // void sum(int m, int n) {
  25. //  result = m + n;
  26. // }
  27.  
  28.  
  29. // int main() {
  30. //  int a, b;
  31. //  printf("Please enter two integer numbers: ");
  32. //  scanf("%d %d", &a, &b);
  33. //  sum(a, b);
  34. //     printf("%d\n", result);
  35.  
  36.  
  37. //  return 0;
  38. // }
  39.  
  40.  
  41.  
  42. // Pointer
  43.  
  44. // int main() {
  45. //  int arr[6] = {1, 2, 3, 4, 5, 6};
  46. //  int *p;
  47. //  p = &arr[0];
  48. //  int i;
  49.  
  50.  
  51. //  // for (i = 0; i < 6; i++) {
  52. //  //  printf("%d ", arr[i]);
  53. //  // }
  54. //  // printf("\n");
  55.  
  56. //  for (i = 0; i < 6; i++) {
  57. //      printf("%d ", *p + i);
  58. //  }
  59. //  printf("\n");
  60. // }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement