How does variable declaration affect memory?

Answer Posted / glibwaresoftsolutions

The type of data contained in that variable determines how much memory has to be allocated or reserved.
If a variable is designated as "integer type," for instance, 32 bits of memory storage will be set aside specifically for that variable.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are data types in c language?

829


which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above

1453


How can you return multiple values from a function?

870


How will you declare an array of three function pointers where each function receives two ints and returns a float?

1104


Why do we use c for the speed of light?

843


What is the difference between arrays and pointers?

881


general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

858


What is static volatile in c?

788


Explain the binary height balanced tree?

939


What is function what are the types of function?

779


what is different between auto and local static? why should we use local static?

906


Explain what is the stack?

873


main() { printf("hello"); fork(); }

980


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

1876


What is the use of extern in c?

874