adspace


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

develop algorithms to add polynomials (i) in one variable

2268


What are pointers? What are different types of pointers?

1276


What is dynamic dispatch in c++?

1142


What is variable initialization and why is it important?

1404


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2836


write a c program to find the sum of five entered numbers using an array named number

2264


Is int a keyword in c?

1067


What is the difference between union and anonymous union?

1413


Differentiate between null and void pointers.

1270


What is the general form of a C program?

1107


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

5455


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2742


swap 2 numbers without using third variable?

1217


How do you determine the length of a string value that was stored in a variable?

1209


what is ur strangth & weekness

2598