168

168



Already Answered By


1: Question:
What is the output of a C Program with functions and pointers.?
1 | void texas(int *,int *);
2 | int main()
3 | {
4 |
int a=11, b=22;
5 |
printf("Before=%d %d, ", a, b);
6 |
texas(&a, &b);
7 |
printf("After=%d %d", a, b);
8 |
9 |
return 0;
10 | }
11 | void texas (int *i, int *j)
12 | {
*i = 55;
13 |
14 |
*j = 65;
15 | }
Answer:
Only one Option is correct. Choose the same. Please note there is Negative Marking for wrong answers.


Answer: A

Answered by: aditya panda


+++++++++++++++++++++++++++++++++++++++++

2: Question:
1 | void printxy(int x, int y)
2 | {
3 |
int *ptr;
4 |
5 |
x = 0;
ptr = &x;
6 |
y = *ptr;
7 |
8 |
9 | }
*ptr = 1;
printf("%d,%d", x, y);
The output of the printxy(1,1) is
Answer:
Only one Option is correct. Choose the same. Please note there is Negative Marking for wrong answers.
0,1
0,0
1,0


Answer: C

Answered by: aditya panda


+++++++++++++++++++++++++++++++++++++++++

3: Question:
Consider the following function written in the C programming language. The output of the above function on input "ABCD EFGH" is
1 | void foo (char *a)
2 | {
3 |
if (*a && *a !=
{
foo(a+1);
putchar (*a);
4 |
5 |
6 |
7 |
}
8 | }


Answer: D

Answered by: sitansu sekhar


+++++++++++++++++++++++++++++++++++++++++


Google search results:


1: https://www.journaldev.com/12552/public-static-void-main-string-args-java-main-method
++++++++++++++++
2: http://www.iitk.ac.in/esc101/06Jan/mid2sol.pdf
++++++++++++++++
3: https://liveexample-ppe.pearsoncmg.com/selftest/selftest11e?chapter=7&username=liang11e
++++++++++++++++
4: https://cs-people.bu.edu/dgs/courses/cs111-old/assignments/errors.html
++++++++++++++++
5: https://www.geeksforgeeks.org/output-of-java-program-set-3/
++++++++++++++++
6: https://www.w3resource.com/java-exercises/basic/index.php
++++++++++++++++
7: https://www.w3resource.com/java-exercises/basic/java-basic-exercise-2.php
++++++++++++++++
8: https://docs.oracle.com/javase/tutorial/java/generics/QandE/generics-answers.html
++++++++++++++++
9: https://math.hws.edu/eck/cs124/javanotes3/c3/quiz-answers.html
++++++++++++++++
10: https://quizlet.com/172398970/ch-6-single-dimensional-arrays-flash-cards/
++++++++++++++++
11: https://stackify.com/top-java-software-errors/
++++++++++++++++

Report Page