# include <stdio.h>
int one_d[]={1,2,3};
main()
{
int *ptr;
ptr=one_d;
ptr+=3;
printf("%d",*ptr);
}
Answer / susie
Answer :
garbage value
Explanation:
ptr pointer is pointing to out of the array range of
one_d.
Is This Answer Correct ? | 3 Yes | 0 No |
how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.
19 Answers Cap Gemini, Infosys,
What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }
how to test pierrot divisor
main() { extern int i; i=20; printf("%d",sizeof(i)); }
main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcat(a,b)); } a. Hello b. Hello World c. HelloWorld d. None of the above
Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).
13 Answers Intel, Microsoft, TCS,
Write a program to model an exploding firecracker in the xy plane using a particle system
How to return multiple values from a function?
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped