void main()
{
int k=ret(sizeof(float));
printf("\n here value is %d",++k);
}
int ret(int ret)
{
ret += 2.5;
return(ret);
}
Answer / susie
Answer :
Here value is 7
Explanation:
The int ret(int ret), ie., the function name and the
argument name can be the same.
Firstly, the function ret() is called in which the
sizeof(float) ie., 4 is passed, after the first expression
the value in ret will be 6, as ret is integer hence the
value stored in ret will have implicit type conversion from
float to int. The ret is returned in main() it is printed
after and preincrement.
| Is This Answer Correct ? | 8 Yes | 0 No |
main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }
#define prod(a,b) a*b main() { int x=3,y=4; printf("%d",prod(x+2,y-1)); }
Write a program to receive an integer and find it's octal equivalent. How can i do with using while loop.
main() { int i=5; printf("%d",++i++); }
could you please send the program code for multiplying sparse matrix in c????
Write a routine to implement the polymarker function
Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.
1 Answers Samar State University,
main() { show(); } void show() { printf("I'm the greatest"); }
Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
There are 21 people in a room. They have to form groups of 3 people each. How many combinations are possible? Write a C program to print the same.
main() { int (*functable[2])(char *format, ...) ={printf, scanf}; int i = 100; (*functable[0])("%d", i); (*functable[1])("%d", i); (*functable[1])("%d", i); (*functable[0])("%d", &i); } a. 100, Runtime error. b. 100, Random number, Random number, Random number. c. Compile error d. 100, Random number