. Consider the following program
main()
{
int a[5]={1,3,6,7,0};
int *b;
b=&a[2];
}
The value of b[-1] is
(A) 1 (B) 3 (C) -6 (D) none

Answer Posted / bipin chandra sai.s

ans is none,bcoz b has been assigned address &[2],but it
has been asked that ans for b[-1],so the location -1 is not
there,we have locations from 0,1,2,3..,so none is the ans

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why c is known as a mother language?

646


What is structure data type in c?

572


How can you read a directory in a C program?

651


What is nested structure?

573


Which is better malloc or calloc?

653






Explain how do you determine a file’s attributes?

594


write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

2455


What is volatile variable in c?

658


How many types of arrays are there in c?

595


Explain logical errors? Compare with syntax errors.

631


What is a floating point in c?

604


What are the differences between new and malloc in C?

610


Differentiate between the expression “++a” and “a++”?

705


please give me some tips for the placement in the TCS.

1633


Differentiate Source Codes from Object Codes

822