756 views
1 votes
1 votes

pls explain why option d is wrong ?

Please log in or register to answer this question.

Related questions

856
views
1 answers
0 votes
Mrityudoot asked Apr 24, 2023
856 views
For arrays with more given elements than its size, why does doing a[i] print garbage value but *a+i brings the correct value, despite them being the same thing (a[i] = *a+i)int a[ ... , Garbage printf( %d , *a+i; // gives 1, 2, 3, 4}
687
views
2 answers
1 votes
Souvik33 asked Nov 28, 2022
687 views
MSQ Consider the following C snippet:#include <stdio.h> int main() { int *ptr = (int*) malloc(100*sizeof(int)); *ptr=33; printf("%d %d\n",ptr,* ... allocated heap is freed, and we cannot update it anymore, as ptr is now a dangling pointer
1.5k
views
2 answers
1 votes
val_pro20 asked Mar 24, 2019
1,529 views
Anyone kindly tell the reason why the outputs are differ ?#include<stdio.h>int main(){ char *ptr = "geeksforgeeks"; printf("%c\n", *&*&*ptr); getchar(); ... "; printf("%s\n", *&*&ptr); getchar(); return 0;}Output-geeksforgeeks
701
views
1 answers
0 votes
Gurdeep Saini asked Feb 1, 2019
701 views
is it dangling pointer ?int main(void) { int* p;printf("%d",*p); return 0;} https://ideone.com/IN77el