#include<stdio.h> int main(){ // int a = 4; // Type declaration instruction // int a = 4, b, c; // Type declaration instruction // b = c = a; // printf("The value of a is %d\n", a); // printf("The value of b is %d\n", b); // printf("The value of c is %d\n", c); float a = 1.1; float b = a + 8.9; printf("The value of b is %f\n", b); return 0; }
#include<stdio.h> // void printArray(int *ptr, int n){ // for(int i=0; i<n; i++){ // printf("The value of element %d is %d\n", i+1, *(ptr+i)); // } // } void printArray(int ptr[], int n){ for(int i=0; i<n; i++){ printf("The value of element %d is %d\n", i+1, ptr[i]); } ptr[2] = 5555; // This value will be changes in arr array of main as well } int main(){ int arr[] = {1,2,3543,34,3,645,23}; printArray(arr, 7); printf("%d", arr[2]); return 0; }
Comments
Post a Comment