2 answers
1
What will be output if you will compile and execute the following c code? #include<stdio.h>int main(){char c=125;c=c+10;printf("%d",c); return 0;}(A) 135(B) 115(C) -121(D...
1 answer
2
1 answer
3
Why is the output of this program as 20#include<stdio.h>void fun(int *p){int q = 10; p = &q;}int main(){int r = 20;int *p=&r;fun(p);printf("%d", *p);return 0;}
2 answers
5
#include <stdio.h int main(void) { double a=30; int r: r=a%5; printf("\n r=%d",r) return 0; }Why this code is throwing compilation error ?
1 answer
6
void fun(char str-ref){str-ref++;}main(){char *str=(void *)malloc(100*sizeof(char));strcpy(str,"Ravindran");fun(&str);puts(str);free(str);}a)ravindrasb)avindrasc)garbage...
3 answers
7
1 answer
8
The output of the following programmain ( ){int a = 1, b = 2, c = 3;printf (“%d”, a+ = (a+ = 3, 5, a));}
0 answers
9
main ( ){static char [3] [4] = {“abcd”, “mnop”, “fghi”};putchar ( a);}
1 answer
10
#includevoid fun(int *p){int q = 10; p = &q;}int main(){int r = 20;int *p = &r;fun(p);printf("%d", *p);return 0;}
0 answers
11
The number of possible ordered trees with 3 nodes A, B, C is:
1 answer
12
For the height of the tree for gate what should we consider the number of edges from the root the leaf or number of levels.????
3 answers
14
For a binary tree T,preorder traversal yields: 11,8,6,4,7,10,19,43,31,29,37,49 andinorder traversal yields: 4,6,7,8,10,11,19,29,31,37,43,49The height of the T is _____...
1 answer
16
main( ){double x, d = 5.0;int y ;x = d * (x = 2.5/d);printf(“x=%lf\n”,x);x = d*(y=(int)2.5+1.5);printf("x=%lf y=%d\n",x,y);}What is output of above program?
4 answers
17
How many different binary search trees can be constructed using six distinct keys? 256 128 132 264
1 answer
18
What is the output of following program?int i ;main ( ){int j;for (; ;){if (j = function (i))printf (“j = %d \n”, j)elsebreak;}}function (x){int x ;static int v = 2;v...
0 answers
20
Let P be a single linked list.Let Q be a pointer to an intermediate node 'X' in the list.What is the worst case time complexity of best known algorithm to delete the node...
2 answers
22
int *A[10];Now, what is meant by A [3]?
1 answer
23
void abc(){auto int a;static int s;a=s++;printf("%d%d",a,s);if(a<=2)abc();printf("%d%d",a,s);}void main(){abc();abc();}how many times printf will execute??
1 answer
24
difference between #define and typedef ???please give logical answer not general answer
2 answers
26
An array A[10][20] starts at decimal address 1000. Each element of array occupies 1 B and array is stored in row major order. Compute address of A[5][6]just give the outp...
1 answer
27
void foo(int *); main() { int x=30 , *a=&x; foo(a++); } void foo(int *a) { printf("%d", *a); }
1 answer
28
#include<stdio.h>int main(){ int arr[] = {10, 20, 30, 40, 50, 60}; int *ptr1 = arr; int *ptr2 = arr + 5; printf("Number of bytes between two pointers are: %d"...