IS it possible to define a zero sized array in c.if it is
possible how can the elements of that array can be
accessed.array index starts from zero,if it is possible to
define zero sized array how can be its first element can be
accesseed.
Answers were Sorted based on User's Feedback
Answer / k satish kumar reddy
it is not possible to define a zero size array in C. Because
we must declare the size of the array at the time of
declaration. If we declare zero size array like array[0] the
compiler shows an error.
| Is This Answer Correct ? | 15 Yes | 6 No |
Answer / crazzybouy
#include<stdio.h>
int main(){
int a[0];
printf("%d",sizeof(a));
}
~
| Is This Answer Correct ? | 10 Yes | 11 No |
ya it's possible to assign , elements can be access an the
store value, this value can be store as an the address so
easily we can find that value, first element can be assigned
as example c[0]=0,
| Is This Answer Correct ? | 2 Yes | 6 No |
Answer / slowdeath
no, it is not possible to define a array with 0 element,
the compiler will show an error message that array must
contain atleast one element
| Is This Answer Correct ? | 0 Yes | 4 No |
Answer / avtar singh
no it is not possible to define array with size 0 as
compiler shows a compilation error of array must contain
atleast one element;
| Is This Answer Correct ? | 0 Yes | 5 No |
Write a c program to read a positive number and display it in words.? ex: 123=one two three help me....
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
How do you define a string?
Does free set pointer to null?
Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main ( ){ int i; i = 0; printf (" The value of i before call %d \n", i); f1 (&i); printf (" The value of i after call %d \n", i); }
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers
hat is a pointer?
Explain the use of fflush() function?
When should you use a type cast?
What is the heap in c?
Explain the difference between malloc() and calloc() in c?
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures