search:
Home
Questions
Quizes
Home
using a pointer received as parameter
Submitted by manager on Sun, 05/08/2011 - 20:06
C programming language
Pointer
Multiple choice question
What does the following code will print?
#include <stdio.h>
void my_func(int *x)
{
x = (int *)malloc(sizeof(int));
*x=12;
}
int main()
{
int v=10;
my_func(&v);
printf("%d", v);
}
12
10
Add new comment
Categories
C programming language
GMAT
MySQL