answersLogoWhite

0


Best Answer

Use ordinal numbers: 0, 1, 2, ...

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you count the number of objects available in a program in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


A class in a program whose objects are created and destroyed throughout the program It is desired that the total number of live objects in the program be known how you do this in C plus plus?

Create a static member variable to contain the count. This variable is common to all instances of the class.Initialize that variable to zero at the beginning of the program.In the class constructor, increment the variable.In the class destructor, decrement the variable.


If a and b are two real numbersexplain how you calculate the difference a-b?

The most reliable method is . . . -- On a clean tabletop or a clear area on the ground, count out 'a' objects in a neat pile. -- Remove 'b' of the objects from the pile and set them aside. -- Count the number of objects remaining in the pile. That number is (a - b).


Program to count the number of characters and words in the line?

in linux wc -l filename will count the lines and wc will count the letters


It 4-1 solved question papers November -2008?

Write a program to count the number of IS in any number in register B and put the count in R5.


What is the program counter?

Counters in basic are used to count a number of times a process is being used.


Write a program to get table of a number?

#include "stdio.h" #include "conio.h" #define TABLE_UP_TO_20 20 void table_of_a_number(int number); int main() { int i = 0x00; printf("Enter a positive number in decimal whose table has to be generated"); scanf("%d",&i); table_of_a_number(i); return 0; } void table_of_a_number(int number) { int count = 0x00; for(count = 0x01;count <=TABLE_UP_TO_20 ;count++) { /* THis will print the table*/ printf(" %d * %d = %d\n", number,count, (number*count)); }


Write a program that ask the user to enter a number n and display the first n even numbers?

#include "stdio.h" int main() { unsigned int number, count; printf("Enter the Number \t"); scanf("%d", &number); printf("The even numbers are: \n"); for(count = 0x01; (count < number && number!= 0x00)) { if(count%2) { }else { printf("%d\n", count); } count++; } return 0; }


What is a counter in math?

in math counters are objects that help you count


How do you write a c program that counts number of blanks in a text file using standard io?

int count_whitespace (FILE* input) { int c, count=0; while (( c = getc(input) ) != EOF ) if ((char) c==' ') ++count; return count; }


C program that prints out multiplication table of any given numbers?

/*mycfiles.wordpress.com Program to prepare Table of any no. using while loop*/ #include #include void main() { int n,t,count=1; clrscr(); printf("Enter any number\n\n"); scanf("%d",&n); while(count<=10) { t=n*count; printf("\n%d*%d=%d",n,count,t); count++; } getch(); }


How would you write a program that counts the number of lowercase in a character?

I would use a loop like this: const char *p= str-1; size_t count= 0; while (*++p) if (islower (*p)) ++count;