Recent questions tagged programming-in-c

0 0 votes
1 1 answer
247
247 views
Which of the following is correct way to declare a functional pointer in C?int *func (int, int);int (*func) (int, int);int (func*) (int, int);int *func* (int, int);
0 0 votes
1 1 answer
281
281 views
What will be the output of the following $\text{C}$ code?#include<stdio.h void main() { int arr[5]={10,20,30,40,50}; int *p = (int*) (&arr+1); printf("\%d\%d", *(arr + 1)...
0 0 votes
0 0 answers
206
206 views
What is the output of code given below:#include<iostream.h using namespace std; class Base { public: Base(){ cout<<"Base Const"; } virtual ~Base() { cout<<"Base dest"; } ...
0 0 votes
2 2 answers
396
396 views
Which of the following C++ statements correctly declares an abstract class?class A { virtual void show ()=0; };class A { void show ()=0; };class A { void show() {} ; };cl...
0 0 votes
1 1 answer
277
277 views
Arrange the following steps of file handling in C in the correct order:Close the fileRead from or write to the fileOpen the fileCheck for errorChoose the correct answer f...
0 0 votes
1 1 answer
303
303 views
Which of the following statements about pointers in $C$ are TRUE.Pointers can be used to access array elementsPointers can store the address of another pointerPointers ar...
3 3 votes
2 2 answers
350
350 views
What is the result of evaluating the postfix expression "$43^{*} 25^{*}+b-$ " ?$8$$14$$10$$5$
0 0 votes
0 0 answers
283
283 views
A program that is used by other routines to accomplish a particular task, is called :Micro programMicro operationRoutineSubroutine
0 0 votes
0 0 answers
189
189 views
What is the output of the following program?#include <stdio.h int main() { int i = 3; while (i ) { int i = 10; i ; printf("%d", i); } printf("%d", i); }$990$$9990$$999-1$...
0 0 votes
1 1 answer
183
183 views
What is the output of the following program?#include <stdio.h #define SQR(x) (x*x) int main() {int a, b = 3; a = SQR(b + 2); printf("%d", a); return 0; }$25$$11$Garbage v...
0 0 votes
1 1 answer
360
360 views
Consider the following code segment:int arr [] = {0,1,2,3,4}; int i=1, *ptr; ptr = arr + 2;arrange the following printf statements in the increasing order of their output...
0 0 votes
2 2 answers
464
464 views
Given below are two statements :Statement $\text{(I)}$ : The friend function and the member functions of a friend class directly access the private and protected data.Sta...
1 1 vote
1 answers 1 answer
371
371 views
Consider the following declarations in C:int P[5] = {1,2,3,4,5}; // Assume the address of P[0] is 100 // Since int = 4 bytes, addresses are: // 100 104 108 112 116 // 1 2...
1 1 vote
0 0 answers
386
386 views
A. z K SB. 122 75 83C. * - +D. P x +
0 0 votes
3 3 answers
655
655 views
#include <stdio.h>int counter = 0;int g(int n) { counter++; return (n + 10);}int f(int n) { return g(n * 2);}int main() { int sum = 0, n; for (n = 1; n < 3...
2 2 votes
1 1 answer
233
233 views
Which of the following is the primary operation for adding an element to a queue in $\text{C}?$EnqueueDequeuePushPop
1 1 vote
1 1 answer
148
148 views
Which of the following describes binding in $\text{C}?$The process of assigning a value to a variableThe process of declaring the type of a variableThe process of associa...
0 0 votes
0 0 answers
144
144 views
Which of the following is an example of passing a parameter by reference in $\text{C}?$ void func(int $\text{x}$)void func(int & $\text{x}$)void func(int $\text{x},$ int ...
0 0 votes
1 answers 1 answer
502
502 views
In C language, if p1 and p2 both have data type int* and p1>p2 (both point to same array) then what is the data type of p1-p2?