How to find the aerry size



How to find the aerry size..

Answer / vijith

#include <stdio.h>

int ArraySize(int array[])
{
int i = 0;
while(array[i] != NULL) i++;
return i;
}

int main(void)
{
int count;
int intarray[10];

for(count = 0;count<=10; ++count)
{
intarray[count] = count;
}


printf("\nintegers in intarray[10] == %d\n",
ArraySize(intarray) );

return 0;
}

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More Programming Languages AllOther Interview Questions

how does database connection using ADO.NET?

0 Answers  


Data Structure:  How many comparisons are necessary to find the largest and smallest of a set of n distinct elements?  

0 Answers   Student,


hi..this is kartheek..complted mca in 2009..but i dont have knowledge in programing..but to learn new language.. which one is suitable for me?is SAP or IBM mainframes is suitable for me..?if it suits how much will it costs..?pls answer...

0 Answers  


How many processes can listen on a single TCP/IP port?

3 Answers  


If u need any fake experience certificate in software side, contact me at: vikramyadhav@gmail.com

0 Answers  






in cobol,wat is the difference in using 'set index in occurs clause' ....and 'occurs depending-on clause'

0 Answers   Infosys,


1.how to deploy the Maven application in weblogic server? 2.In Real time projects all classes are singleton or some classes only singleton explain? 3.what are the major uses of the designpatterns? 4.explain restful &Soap based services explain?

0 Answers   Accenture,


what is the basic and unique feature of dotnet

0 Answers   HCL,


When you?re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?

2 Answers   BirlaSoft,


how do i add a column dynamically in a table by using java application?

0 Answers  


how can i apply validation without using errorprovider in C# windows application

1 Answers  


cobol is execution r not without jcl

0 Answers   IBM,


Categories