main()
{
int i, j;
scanf("%d %d"+scanf("%d %d", &i, &j));
printf("%d %d", i, j);
}
a. Runtime error.
b. 0, 0
c. Compile error
d. the first two values entered by the user
Answers were Sorted based on User's Feedback
Answer / guest
d) two values entered, 3rd will be null pointer assignment
| Is This Answer Correct ? | 3 Yes | 2 No |
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
How do you write a program which produces its own source code as its output?
main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); }
main() { char *p; p="%d\n"; p++; p++; printf(p-2,300); }
main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
WAP to display 1,2,3,4,5........N
main() { char p[ ]="%d\n"; p[1] = 'c'; printf(p,65); }
What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?
void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }
Write a program to model an exploding firecracker in the xy plane using a particle system
main() { int a[10]; printf("%d",*a+1-*a+3); }
how to programme using switch statements and fuctions, a programme that will output two even numbers, two odd numbers and two prime numbers of the users chioce.
0 Answers Mbarara University of Science and Technology,