#include<stdio.h>
main()
{
int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} };
int *p,*q;
p=&a[2][2][2];
*q=***a;
printf("%d..%d",*p,*q);
}
Answer / susie
Answer :
garbagevalue..1
Explanation:
p=&a[2][2][2] you declare only two 2D arrays. but you are
trying to access the third 2D(which you are not declared) it
will print garbage values. *q=***a starting address of a is
assigned integer pointer. now q is pointing to starting
address of a.if you print *q meAnswer:it will print first
element of 3D array.
Is This Answer Correct ? | 9 Yes | 1 No |
How we print the table of 2 using for loop in c programing?
#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
Is the following code legal? struct a { int x; struct a *b; }
Write a routine that prints out a 2-D array in spiral order
void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }
Write a C function to search a number in the given list of numbers. donot use printf and scanf
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"
how can i cast a char type array to an int type array