Samsung Interview Question
Software Engineer / DevelopersCountry: -
Interview Type: In-Person
<pre lang="" line="1" title="CodeMonkey79022" class="run-this">#include<stdio.h>
int show();
int main()
{
int (*fnPtr)();
fnPtr=show; //assigning address of show function to our function pointer
printf("Address of function :%u",show);
(*fnPtr)(); //call
}
int show()
{
printf("\nFunction called using pointer!");
}</pre><pre title="CodeMonkey79022" input="yes">
</pre>
<pre lang="" line="1" title="CodeMonkey6442" class="run-this">#include<stdio.h>
- Anonymous October 08, 2011int show();
int main()
{
int (*fnPtr)();
fnPtr=show; //assigning address of show function to our function pointer
printf("Address of function :%u",show);
(*fnPtr)(); //call
}
int show()
{
printf("\nFunction called using pointer!");
}</pre><pre title="CodeMonkey6442" input="yes">
</pre>