Look at the Code:
main()
{
int a[]={1,2,3},i;
for(i=0;i<3;i++)
{
printf("%d",*a);
a++;
}
}
Which Statement is/are True w.r.t the above code?
I.Executes Successfully & Prints the contents of the array
II.Gives the Error:Lvalue Required
III.The address of the array should not be changed
IV.None of the Above.
A)Only I B)Only II C)II & III D)IV

Answers were Sorted based on User's Feedback



Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a);..

Answer / santhoo035

C

Is This Answer Correct ?    4 Yes 2 No

Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a);..

Answer / jitendra kumar arya

c

Is This Answer Correct ?    3 Yes 2 No

Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a);..

Answer / optimistsushma

B)

Is This Answer Correct ?    1 Yes 1 No

Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a);..

Answer / rohit

B

Is This Answer Correct ?    0 Yes 0 No

Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a);..

Answer / hussain reddy

c

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

What are local and global variables?

3 Answers  


Difference between macros and inline functions? Can a function be forced as inline?

0 Answers   HAL, Honeywell, Zomato,


read a number & print all its devisors using c-program?

3 Answers  


What is the difference between class and object in c?

0 Answers  


WHAT IS FLOAT?

3 Answers  






cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

0 Answers  


Process by which one bit pattern in to another by bit wise operation is?

0 Answers   InterGraph,


write an algorithm and a program to count the number of elements in a circularly singly linked list

1 Answers   Ignou,


Write a program to print distinct words in an input along with their count in input in decreasing order of their count..

1 Answers  


How can you read a directory in a C program?

0 Answers  


Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me

0 Answers  


Can you add pointers together? Why would you?

0 Answers  


Categories