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 |
Write a program to implement the motion of a bouncing ball using a downward gravitational force and a ground-plane friction force. Initially the ball is to be projected in to space with a given velocity vector
main() { int i=5; printf(ā%dā,i=++i ==6); }
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
‎#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }
how can i search an element in an array
2 Answers CTS, Microsoft, ViPrak,
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }
#define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); }
Write a procedure to implement highlight as a blinking operation
find simple interest & compund interest
why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?
int swap(int *a,int *b) { *a=*a+*b;*b=*a-*b;*a=*a-*b; } main() { int x=10,y=20; swap(&x,&y); printf("x= %d y = %d\n",x,y); }
could you please send the program code for multiplying sparse matrix in c????