The functions you've created will work but won't really do anything. They don't return anything (void) and the argument list is empty (func1( ) ).
First:
Let's change void func1( ) to int func1( int nValue ). And let's say func1 returns double the value of any value it is passed.
Second:
Let's change void func2( ) to void func2( int * pValue ). Where func2 will double the value of the integer pointed to by pValue.
Code:
int func1( int nValue ); // declaration
void func2( int * pValue ); //declarartion
int main( )
{
int n = 10;
int nNew = func1( n ); //nNew will equl 20 and n will stay at 10
int *pNew = &nNew; // assign nNew to pNew
func2( pNew ); //when this returns nNew will be 40
return 0;
}
int func1( int nValue ) //definition
{
return nValue * 2;
}
void func2( int * pValue ) //definition
{
*pValue *= 2; //* dereference pValue and double what it points to.
}
And the question about char a='hello user' // <-- Is that the right type of quotes? won't work.
Try char a[] = "hello user"; // this will create an array of 11 chars 10 for the text and 1 to null terminate the string.