How can you increase the size of a statically allocated array?



How can you increase the size of a statically allocated array?..

Answer / Parul Sonker

A statically allocated array cannot be resized during runtime. If you need to store more values than the initial capacity, consider using a dynamically allocated array or another data structure.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?

4 Answers   Ramco,


What is the benefit of using const for declaring constants?

1 Answers  


I have a varargs function which accepts a float parameter?

1 Answers  


change to postfix a/(b+c*d-e)

8 Answers   Value Labs,


How can I dynamically allocate arrays?

1 Answers  


identify the in correct expression a.a=b=3=4; b.a=b=c=d=0; float a=int b=3.5; d.int a; float b; a=b=3.5;

8 Answers   TCS,


Explain Function Pointer?

1 Answers   Wipro,


there is two conditions , 1. while using for loop for printing 1 to 50 no's simulteneous 2. while using printf functios for printing 1 to 50 no's simulteneous with or without using variables who will take more time for compiling and execution? explain in details with reason?

1 Answers  


In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)

1 Answers   Wipro,


Give the output for the following program. #define STYLE1 char main() { typedef char STYLE2; STYLE1 x; STYLE2 y; clrscr(); x=255; y=255; printf("%d %d\n",x,y); }

2 Answers   ADITI,


What is page thrashing?

1 Answers  


what is difference between declaring the pointer as int and char in c language?

3 Answers  


Categories