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

How do you list files in a directory?

553


what do you mean by inline function in C?

605


What is the best organizational structure?

633


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

660


What is the use of volatile?

601






Write a program to print “hello world” without using semicolon?

664


What is difference between Structure and Unions?

631


write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.

3329


What does c mean before a date?

581


What is modifier & how many types of modifiers available in c?

597


What is a example of a variable?

537


What is self-referential structure in c programming?

646


What is the symbol indicated the c-preprocessor?

686


What is a volatile keyword in c?

629


How can I change their mode to binary?

682