Redirected
in Programming in C
790 views
0 votes
0 votes

Approach?

Consider the following C program?

#include<stdio.h>
int main()
{
    short int c[5];
    int i=0;
    for(i=0;i<5;i++)
    c[i]=400+i;
    char *b = (char *)c;
    printf("%d", *(b+8));
}

The output of above program, when ‘short int take ‘2 B’ and character take 1 B to represent _________. (Assume memory storage follows Little Endian architecture).

in Programming in C
by
790 views

4 Comments

@Rudra Pratap

did you read the comments?

0
0
where is 106 value in the address values??
0
0
0
0

1 Answer

2 votes
2 votes
Best answer

This is the exact solution. :)

selected by

1 comment

what if *(b+9) would have asked?
0
0
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true