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

Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff

0 Answers  


Prove or disprove P!=NP.

5 Answers   Microsoft,


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

0 Answers   College School Exams Tests,


why wipro wase

0 Answers   Wipro,


Describe newline escape sequence with a sample program?

0 Answers  






what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year

7 Answers   TCS,


What do you mean by command line argument?

0 Answers   TCS,


What is the benefit of using an enum rather than a #define constant?

0 Answers  


What is "Hungarian Notation"?

0 Answers   Celstream,


Two's compliment of -5

4 Answers   Adobe,


What is C++

4 Answers  


how can u print a message without using any library function in c

1 Answers   NIIT,


Categories