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

What are header files and what are its uses in C programming?

639


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

636


What is 2c dna?

609


Difference between malloc() and calloc() function?

655


What are actual arguments?

648






How can a process change an environment variable in its caller?

657


Can you explain the four storage classes in C?

645


What is bubble sort technique in c?

593


What is the process to create increment and decrement stamen in c?

589


What is const and volatile in c?

567


In which layer of the network datastructure format change is done

1435


How can I manipulate strings of multibyte characters?

640


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

712


What is the easiest sorting method to use?

636


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1520