Ans: virtual
Explanation:
The variable which are defined in the program will be stored in different memory locations based on type of data.basically we store the initialized data and uninitialised data will be stored in different memory location.
Whenever you will print the address of any variable it will print the address of virtual memory address, these virtual memory address will be keep on changing whenever program is running,so we don't know exactly what is the address of variables.
Once we get the virtual address then we will find the appropriate physical address mapping to those varaibles in operating system level
Physical address we can't see unless working at the kernel level of programming.
So it will print the virtual address of varaible everytime.
What type of address is printed by following program Question 15 What type of address is...
What will be the value of x printed by the following code (modify_x() function)? #include <stdio.h> void modify_x(void) int x 10; x+ 20 printf("X is : %d\n", x); int main(void) modify_x(); modify_x0: return O; First time:_ Second time: In earlier question (modify_x() function based), what would you do to have different values in the output upon execution of the function each time? HTML Editor
QUESTIONS What will be the output of the following C code? 1. #include <stdio.h> int maino int 1 - -3; int k - * % 2; printf(\n", k); Compile time error O-1 Implementation defined
Read the following code and fill the following blanks (no space is allowed): #include <stdio.h> int maino inta - 55: int*pa &a; "An integer" /* A pointer to an integer" int *ppa = &pa; /* A pointer to a pointer to an integer printf("The content of a is %d\n", printf("The address of a is %p\n", printf("The content of pa is %p\n", printf("The address of pa is %p\n", printf("The dereferenced value of pa is %d\n", printf("The content of ppa is pln",...
What is printed when the following code is executed? #include <stdio.h> int main() { for (int i=3, j=5; i>=0; i-=2, j+=j*i) { printf("%d", j); منم }
OPERATING SYSTWM Question 31 What is the output of this C program? #include #include void main() int mptr, *cptr mptr = (int*)malloc(sizeof(int)); printf("%d", "mptr); cptr = (int)calloc(sizeof(int),1); printf("%d","cptr); garbage 0 000 O garbage segmentation fault Question 8 1 pts If this program "Hello" is run from the command line as "Hello 12 3" what is the output? (char '1'is ascii value 49. char '2' is ascii value 50 char'3' is ascii value 51): #include<stdio.h> int main (int argc, char*argv[]) int...
1. What is the output of the following program? include <stdio.h> int wilma (int x) if (x<5) x = 7; return (x) int main (void) int x-1 x=wilma (x) ; printf ("%d", x); return (0) b)3 c) 4 d) 7 a) 1 e) none of these
9. Which of the following is true for the following program? #include <stdio.h> int maino int i = 1; switch (0) case 1: printf("%d", 0); case 2: printf("%d", 0); case 3: printf("%d", 0); default: printf("%d", 1); return 0; } (2 points) The program has no error, the output is 1111 The program has no error, the output is 1 The program produces a compile time error, because there are no break statements The program produces a compile time error, because...
QUESTION 12 What is the output of the following program? #include <stdio.h> int main(void) printf("From sealnto shininginC"); O a. From sea to shining O b. From sea to shining O c. From seanto shining nC O d. From sea to shining C
What is the output of the following c program. Why, Can you tell me how do you solve it? #include <stdio.h> int fun(int n) { if(n==0) { return 1; } else return 7 + fun(n-2); } int main() { printf("%d", fun (4)); return 0; | }
Question 8 2 pts What is the output of the fllowing program? #inclu <stdio.h> int main int a=2; int 'b.c b-&a;/suppose address of a is 100*/ c-&b:/suppose address of b is 200 printf ( "%u %u %uln", &a, &b, c); printf ("%d %d %d %d %d\n", a, "(&al, .c, .b. "c ) ; return O HTML Editor