main()
{
int i = 1;
int num[] = {1,2,3,4};
num[i] = i++;
printf("%d", num[i]);
}

what will be the output?
}

Answer Posted / abdur rab

it will lead to Undefined behaviour, both answers 3 aand 4
are correct.

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is assert and when would I use it?

578


What do you mean by a local block?

628


Why c is called object oriented language?

581


Who is the main contributor in designing the c language after dennis ritchie?

550


How to compare array with pointer in c?

619






Write a code to generate a series where the next element is the sum of last k terms.

732


Is there a way to jump out of a function or functions?

634


What type is sizeof?

583


What is meant by inheritance?

632


Explain indirection?

645


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

646


Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

608


What is the function of volatile in c language?

664


What are the two types of structure?

572


Explain two-dimensional array.

625