What is array in c with example?
Answer / Narendra Singh Rajput
An array in C is a collection of variables of the same data type stored in contiguous memory locations. You can create an array by defining its name and specifying its size between square brackets (e.g., int arr[10]). Accessing elements within the array is done using indexes, where each element's index corresponds to its position in the array.nnHere's a simple example:nn```cnint arr[5] = { 1, 2, 3, 4, 5 }; /* initialize an array with 5 elements */narr[0]; /* access the first element (value: 1) */narr[2]; /* access the third element (value: 3) */n```
| Is This Answer Correct ? | 0 Yes | 0 No |
2. Write a function called hms_to_secs() that takes three int values—for hours, minutes, and seconds—as arguments, and returns the equivalent time in seconds.. Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.
Is there any data type in c with variable size?
what is function pointer?
what is the code for getting the output as * ** ***
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
what does ‘segmentation violation’ mean?
What is unary operator?
code for selection sort?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Write a C program in Fibonacci series.
What kind of structure is a house?
write a progam to display the factors of a given number and disply how many prime numbers are there?