# 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 |
#define a 10 void foo() { #undef a #define a 50 } int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } explain the answer
char *someFun1() { char temp[ ] = “string"; return temp; } char *someFun2() { char temp[ ] = {‘s’, ‘t’,’r’,’i’,’n’,’g’}; return temp; } int main() { puts(someFun1()); puts(someFun2()); }
There were 10 records stored in “somefile.dat” but the following program printed 11 names. What went wrong? void main() { struct student { char name[30], rollno[6]; }stud; FILE *fp = fopen(“somefile.dat”,”r”); while(!feof(fp)) { fread(&stud, sizeof(stud), 1 , fp); puts(stud.name); } }
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }
why the range of an unsigned integer is double almost than the signed integer.
what is the code of the output of print the 10 fibonacci number series
4. Main() { Int i=3,j=2,c=0,m; m=i&&j||c&I; printf(“%d%d%d%d”,I,j,c,m); }
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']
write a program to Insert in a sorted list
write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }