What is the output of following program? # include <stdio.h> void fun(int x) { x = 30; } int main() { int y = 20; fun(y); printf("%d", y); return 0; }
Asked in RPSC 23Feb 2016Question Paper for VicePrincipal/Superintendent ITI Screening Test 2012(Computer Science)VICE PRINCIPAL/SUPDT. ITI - 2012
Show answer
Answer: B. 20
More RPSC Prelims previous year questions questions
- In below program, what would you put in place of “?” to print “Quiz”? #include <stdio.h> int main() { chararr[] = "GatesQuiz"; printf("%s", ?); return 0; }
- The reason for using pointers in a C-program is
- Consider the following two C lines: int var1; externint var2; Which of the following statements is correct?
- What is the output of the following program ? #include <stdio.h> int main() { int i; for (i = 1; i != 10; i += 2) printf (" GatesQuiz "); return 0; }
- Breadth First Search of Graph, which of the following data structure is used?
- What is the complexity of Kruskal's algorithm for complete graph of n vertices to final minimum cost spanning tree? (if we use min heap data structure)
- What is the complexity of the following function T(n) = { 0(1) n = 1 T(n-1) + log n n > 1
- Convert the following expression from reverse polish notation to infix notation. A B C D E + * - /