aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • SAS and C Programming Fundamentals
  • void main() { int *ptr; int item=5; int arr[]={10,20,30,4...
Multiple choice technology programming languages

void main() { int *ptr; int item=5; int arr[]={10,20,30,40,50}; ptr = &item; for(;item>=0;item--) { printf("%d ",*ptr); ptr--; } }

  1. 5 50 40 30 20 10

  2. 5 Followed by Random Numbers

  3. 5 4 3 2 1

  4. Segmentation Fault

Reveal answer Fill a bubble to check yourself
A Correct answer

Keep practicing — related questions

  • Determine Output: int main() { int a[5] = {1,2,3,4,5}; int *ptr = (int*)(&a+1); printf("%d %d" , *(a+1), *(...
  • main() { int a[5] = {10,20,30,40,50}; char *p; p=(char *)a; printf("%d\n",a); }
  • void main() { int arr[4] = {1, 2,3, 4} int *ptr = &arr[0], i; for(i = 0; i < 2; i++) } What should be the s...
  • 1)main() { static int a[]={0,1,2,3,4}; int *p[]={a,a+1,a+2,a+3,a+4}; int **ptr=p; ptr++; printf(“\n%d%d%d”p...
  • #include 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----...
  • void main() { int a[2][3]={{1,2,3},{4,5,6}}; printf("%d\n",++**(a+1)); }
  • void main() { int i; char *item; for(i=0;i<512;i++,item++) printf("%c",item); }
  • int y[4] = {6, 7, 8, 9}; int *ptr = y + 2; printf(%dn, ptr[ 1 ] ); /*ptr+1 == ptr[1]*/ What is printed, whe...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy