M
Q. What is the output of the following code snippet?
#include <stdio.h> #include<stdlib.h> void set(int *to) { to = (int*)malloc(5 * sizeof(int)); } void solve() { int *ptr; set(ptr); *ptr = 10; printf("%d", *ptr); } int main() { solve(); return 0; }
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. Which of the following is the collection of different data types?
Q. A pointer variable of type _______ cannot be dereferenced
Q. What is the output of C Program with arrays?
Q. Which of the following cannot be a structure member?
Q. What is the output of C program with structures?
Q. In compilation process at what sequence Preprocessor comes into picture?
Q. Is it possible to nest if-else statements in C programming?
Discusssion
Login to discuss.