What are static variables, and where are they stored?
Answers were Sorted based on User's Feedback
Answer / nashiinformaticssolutions
Static variables retain their value across multiple function calls. They are stored in the data segment of memory.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / glibwaresoftsolutions
Static variables retain their value across multiple function calls. They are stored in the data segment of memory.
| Is This Answer Correct ? | 0 Yes | 0 No |
I use turbo C which allocates 2 bytes for integers and 4 bytes for long. I tried to declare array of size 500000 of long type using the following code... long *arr; arr=(long *)(malloc)(500000 * sizeof(long)); It gives a warning that "Conversion may lose significant digits in function main"... And the resulting array size was very less around 8400 as compared to 500000. Any suggestions will be welcomed....
What math functions are available for integers? For floating point?
Develop a flow chart and write a c program to find the roots of a quadratic equation ax2+bx+c=0 using switch and break statement.
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
What is c standard library?
What is structure padding and packing in c?
Write a program to check armstrong number in c?
Difference between Shallow copy and Deep copy?
What is I ++ in c programming?
How main function is called in c?
Ow can I insert or delete a line (or record) in the middle of a file?
6)What would be the output? main() { int u=1,v=3; pf("%d%d",u,v); funct1(&u,&v); pf("%d%d\n",u,v); } void funct1(int *pu, int *pv) { *pu=0; *pv=0; return; } a)1 3 1 3 b)1 3 1 1 c)1 3 0 0 d)1 1 1 1 e) 3 1 3 1