What characters do you want to count? As I am not a mind-reader, I can only give you an example which might give you an idea.
size_t count_specified_char_occurances (const char *s, int c)
{
const char *p= s-1;
size_t count= 0;
while (*++p) if (*p==(char)c) ++count;
return count;
}
int main (void)
{
printf ("P in APPLE: %d\n", (int)count_specified_char_occurances ("APPLE", 'P');
return 0;
}
pointers.
addresses
Java doesn't have pointers. C++ has pointers.
find the address
Pointers are variables that hold the address to a memory location. It makes copying/assignment very efficient, since it eliminates the need for copying entire memory blocks...only the address is copied. This is useful for example for function arguments.
pointers are the variable which stores the address of another variable.
In programming languages, variables are used to store data values, while pointers are variables that store memory addresses of other variables. Variables directly hold data, while pointers hold the location of where data is stored in memory.
All programming languages implement pointers, but not all languages allow low-level access to memory through a raw pointer. Java, for instance, uses resource handles and smart pointers rather than raw pointers, however the actual allocation of memory is handled by the Java virtual machine (JVM) so there is no need for low-level raw pointers.
i don't realy have any idea about this but i think its the need of postures
A virtual function table is a table of pointers to functions.
If you're a beginner you don't need to worry about near and far pointers. They are a concept that have been obsoleted on most PCs. If you are programming for an embedded device, read the datasheet. It will explain it in terms of the device you are programming for.
scanf() is an input function which reads input from the standard input devices such as keyboard. Syntax: scanf("Control Character",address_list); where control character is a sequence of one or more character such as %d,%f,%lf,%lld. Address list specifies the variables, pointers etc. e.g. scanf("%d",&num);