Is this code legal?
int *ptr;
ptr = (int *) 0x400;
Answer / susie
Answer :
Yes
Explanation:
The pointer ptr will point at the integer in the
memory location 0x400.
| Is This Answer Correct ? | 17 Yes | 2 No |
prog. to produce 1 2 3 4 5 6 7 8 9 10
¦void main() ¦{ ¦int i=10,j; ¦ j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-30 but in same question if we write as- ¦void main() ¦{ ¦int i=10; ¦ int j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-33 why output is changed from 30 to 33. Can any body answer...
How to return multiple values from a function?
In the following pgm add a stmt in the function fun such that the address of 'a' gets stored in 'j'. main(){ int * j; void fun(int **); fun(&j); } void fun(int **k) { int a =0; /* add a stmt here*/ }
how to delete an element in an array
main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }
main() { char *p = “ayqm”; char c; c = ++*p++; printf(“%c”,c); }
program to find magic aquare using array
Is this code legal? int *ptr; ptr = (int *) 0x400;
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }
Write a program that reads a dynamic array of 40 integers and displays only even integers
Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..