If I want to initialize the array like.
int a[5] = {0};
then it gives me all element 0.
but if i give int a[5] = {5};
then 5 0 0 0 0 is ans.
what will I do for all element 5 5 5 5 5 in a single
statement???

Answer Posted / n

int a[5]={5,5,5,5,5};

Is This Answer Correct ?    27 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

2261


Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.

2641


Is it possible to execute code even after the program exits the main() function?

803


Explain the red-black trees?

600


What is wrong with this program statement? void = 10;

811






What would be an example of a structure analogous to structure c?

570


What is the general form of function in c?

607


What is extern storage class in c?

509


What are the advantages of using linked list for tree construction?

638


What is nested structure in c?

603


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

596


What is %d called in c?

751


What is calloc malloc realloc in c?

585


What is the difference between arrays and pointers?

627


Why is void main used?

613