21. If 43 times of two digit numbers is 34 times of two digit reverse no . and sum of number is 14 then what is the number?
Answer: 68
Explanation:43 time the no. And 34 time the reverse no.
43(10x+ y)=34(10y+ x)
430x+ 43y= 340y+34x
430x+43y-340y-34x=0
To solve this equation become
4x-3y=0 -------------- (1)
Sum of no. And reverse no. Is 14
X+ Y= 14 ------------- (2)
To solve both equation value of x and y
X= 6 and y= 8
So, number will be 68
Workspace
TCS TCS NQT
22. \(\frac{2}{3}\)rd of the balls in a bag are blue, the rest are pink. if \(\frac{5}{9}\)th of the blue balls and \(\frac{7}{8}\)th of the pink balls are defective, find the total number of balls in the bag given that the number of non-defective balls is 146?
Answer: 438
Explanation:Let total no of balls = x blue = \(\frac{2x}{3}\)
pink = \(\frac{x}{3}\)
Total no of defective balls = \(\frac{10x}{27} + \frac{7x}{24}\)
= \(\frac{143x}{216}\)
Non defective balls = \(x - \frac{143x}{216} = 146\)
=> x = 432
Workspace
TCS TCS NQT
23. #include
int main()
{
short int i;
scanf("%hd", &i);
printf("%hd", i); return 0;
}
Answer: Whatever user types
Explanation:Here is no explanation for this answer
Workspace
TCS TCS NQT
24. Which is true about fputs returns?
Answer: Both (A) & (B)
Explanation:Here is no explanation for this answer
Workspace
TCS TCS NQT
25. #include
int main()
{
int i = 0;
for (foo(); i == 1; i = 2)
printf("In for loop\n");
printf("After loop\n");
}
int foo()
{
return 1;
}
Answer: After loop
Explanation:Here is no explanation for this answer
Workspace
TCS TCS NQT
26. #include
int main()
{
int i = 0;
while (i = 0)
printf("True\n");
printf("False\n");
}
Answer: FALSE
Explanation:Here is no explanation for this answer
Workspace
TCS TCS NQT
27. The syntax for constant pointer to address (i.e., fixed pointer address) is:
Answer:
Here is no explanation for this answer
Workspace
TCS TCS NQT
28. #include
typedef struct p *q;
struct p
{
int x; char y; q ptr;
};
int main()
{
struct p p = {1, 2, &p};
printf("%d\n", p.ptr->ptr->x);
return 0;
}
Answer: 1
Explanation:Here is no explanation for this answer
Workspace
TCS TCS NQT
29. int* ((*x)())[2];
Answer: FALSE
Explanation:Here is no explanation for this answer
Workspace
TCS Societe Generale TCS NQT
30. Which function will not be called in the following program?
#include
void first()
{
printf("first");
}
void second()
{
first();
}
void third()
{
second();
}
void main()
{
void (*ptr)();
ptr = third;
ptr();
}
Answer: None of these
Explanation:Here is no explanation for this answer
Workspace
TCS TCS NQT