C program to print lengh of an array (program 20)

/*
Made by Anmol main
Student :B.tech CSE 
Punjabi university Patiala
Program No.:20
*/
#include <stdio.h>
int arr[] = {326594972647132598};
int main()
{
    int ij;
    int spq;
   //Logic : sizeof(name of array)/sizeof(name of array[0])
    s = sizeof(arr);
    p = sizeof(arr[0]);
    q = s / p;
    printf("\nThere are total %d elements are there in array.\n"q);
    return 0;
}

Comments

Popular posts from this blog

Glowing-Log-in-window-in-Pure-html-css #30

Program to swap 2 numbers by using 3 numbers, taking input from user in C language. #1