Forwarded from Animesh Sinha
int a[2][3] = {1,2,3,4,5,6};
int (*ptr)[3] = a;
Here what is ptr?
Is it an array having 3 elements where each element is an pointer to integer variable?
Or is it an pointer pointing to an integer array having 3 elements?
Anyone please explain
int (*ptr)[3] = a;
Here what is ptr?
Is it an array having 3 elements where each element is an pointer to integer variable?
Or is it an pointer pointing to an integer array having 3 elements?
Anyone please explain
Computer Science quiz
int a[2][3] = {1,2,3,4,5,6}; int (*ptr)[3] = a; Here what is ptr? Is it an array having 3 elements where each element is an pointer to integer variable? Or is it an pointer pointing to an integer array having 3 elements? Anyone please explain
Telegram
Animesh Sinha in Gate CSE (STAY AT HOME)
int a[2][3] = {1,2,3,4,5,6};
int (*ptr)[3] = a;
Here what is ptr?
Is it an array having 3 elements where each element is an pointer to integer variable?
Or is it an pointer pointing to an integer array having 3 elements?
Anyone please explain
int (*ptr)[3] = a;
Here what is ptr?
Is it an array having 3 elements where each element is an pointer to integer variable?
Or is it an pointer pointing to an integer array having 3 elements?
Anyone please explain
Disha
What will be the output of the following C code? #include <stdio.h> #define foo(x, y) x / y + x int main() { int i = -6, j = 3; printf("%d\n",foo(i + j, 3)); return 0; } a) Divided by zero exception b) Compile time…
Telegram
Deepali Sharma in Gate CSE (STAY AT HOME)
What will be the output of the following C code?
#include <stdio.h>
#define foo(x, y) x / y + x
int main()
{
int i = -6, j = 3;
printf("%d\n",foo(i + j, 3));
return 0;
}
a) Divided by zero exception
b) Compile…
#include <stdio.h>
#define foo(x, y) x / y + x
int main()
{
int i = -6, j = 3;
printf("%d\n",foo(i + j, 3));
return 0;
}
a) Divided by zero exception
b) Compile…
Disha
What will be the output of the following C code? #include <stdio.h> #define MIN 0 #if defined(MIN) + defined(MAX) #define MAX 10 #endif int main() { printf("%d %d\n", MAX, MIN); return 0; } a) 10 0 b) Compile…
Telegram
Deepali Sharma in Gate CSE (STAY AT HOME)
What will be the output of the following C code?
#include <stdio.h>
#define MIN 0
#if defined(MIN) + defined(MAX)
#define MAX 10
#endif
int main()
{
printf("%d %d\n", MAX, MIN);
return 0;
}
a) 10 0
b) Compile…
#include <stdio.h>
#define MIN 0
#if defined(MIN) + defined(MAX)
#define MAX 10
#endif
int main()
{
printf("%d %d\n", MAX, MIN);
return 0;
}
a) 10 0
b) Compile…