How can I set an array's size at run time?

Answer Posted / arthy

main()
{
int n,i;
scanf("%d",&n);
int a[n];
}

Is This Answer Correct ?    4 Yes 25 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

please explain every phase in the "SDLC" in the dotnet.

2182


What is array in C

713


Is it possible to have a function as a parameter in another function?

604


What is maximum size of array in c?

588


What is the use of ?: Operator?

671






List some applications of c programming language?

560


Tell me is null always defined as 0(zero)?

677


Here is a good puzzle: how do you write a program which produces its own source code as output?

602


Differentiate between a for loop and a while loop? What are it uses?

677


Is null equal to 0 in sql?

657


How to implement a packet in C

2401


What is the 'named constructor idiom'?

645


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

664


.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }

2005


C program to find all possible outcomes of a dice?

1859