Answer Posted / nithin
int main()
{
int i, max;
// Array
int *a;
printf("Enter the size of array\n");
scanf("%d", &max);
//Run time size allocation of an array
a = (int*)malloc(max * sizeof(int));
for(i = 0; i < max;i++)
{
a[i] = i * 2;
printf("value of element %d is %d\n", i, a
[i]);
}
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can you return multiple values from a function?
Explain what is a 'locale'?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
What is memcpy() function?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
Is null always defined as 0(zero)?
What is a volatile keyword in c?
code for replace tabs with equivalent number of blanks
What is variable declaration and definition in c?
What is the full form of getch?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What is meant by errors and debugging?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Write a program to use switch statement.
How to write c functions that modify head pointer of a linked list?