TCS - C Programming Concept MCQ - Set1
TCS - C Programming Concept MCQ - Set1
strptr()
5. while declaring parameters for main, the second parameter argv should be
declared as
char * argv[]
1 of 4 10-08-2019, 22:52
TCS - C Programming Concept MCQ - Set1 https://www.simpleway2code.me/2017/10/tcs-c-programming...
Output: NO
11. which of the following is used locate the end of the file ?
feof()
12. A code will be given and you will be asked which header is missing??
14. a code will be given and you have to find the error.
REACTIONS
POSTED BY HRISHABH
2 of 4 10-08-2019, 22:52
TCS - C Programming Concept MCQ - Set1 https://www.simpleway2code.me/2017/10/tcs-c-programming...
BHUSHAN DHAWANE
Vijay Gugulothu
saumya
saumya
ankit marwaha
Hrishabh Bajaj
Unknown
Hrishabh
poovazhagan
Unknown
3 of 4 10-08-2019, 22:52
TCS - C Programming Concept MCQ - Set1 https://www.simpleway2code.me/2017/10/tcs-c-programming...
AMIT KASHYAP
4 of 4 10-08-2019, 22:52
TCS - C Programming Concept MCQ - Set 2 https://www.simpleway2code.me/2017/11/tcs-c-programming...
15
3. If a functions return type is not explicitly defined then it is default to ..........(in C).
int
Stack
1 of 4 10-08-2019, 22:53
TCS - C Programming Concept MCQ - Set 2 https://www.simpleway2code.me/2017/11/tcs-c-programming...
8. What is recursion ?
REACTIONS
POSTED BY HRISHABH
Vijay Gugulothu
2 of 4 10-08-2019, 22:53
TCS - C Programming Concept MCQ - Set 2 https://www.simpleway2code.me/2017/11/tcs-c-programming...
Hrishabh Bajaj
Anuska Dutta
Hrishabh Bajaj
neha pandey
heebah saleem
Unknown
heebah saleem
Tina Rathi
alok kumar
3 of 4 10-08-2019, 22:53
TCS - C Programming Concept MCQ - Set 2 https://www.simpleway2code.me/2017/11/tcs-c-programming...
Hrishabh
Anonymous
poovazhagan
Hrishabh
4 of 4 10-08-2019, 22:53
TCS - C Programming Concept MCQ - Set 3 https://www.simpleway2code.me/2018/01/tcs-c-programming...
Ques. Which of the following does not require to include math.h header file?
double
20
477764
1 of 3 10-08-2019, 22:53
TCS - C Programming Concept MCQ - Set 3 https://www.simpleway2code.me/2018/01/tcs-c-programming...
{
printf(“%d”,sizeof('a'));
//same as → sizeof(97)
2 or 4
printf("%ld\n",fact(5));
Ques. If a function’s return type is not explicitly defined then it’s default to ______
(In C).
int
2 of 3 10-08-2019, 22:53
TCS - C Programming Concept MCQ - Set 3 https://www.simpleway2code.me/2018/01/tcs-c-programming...
Chapterwise C - MCQ .
REACTIONS
POSTED BY HRISHABH
Unknown
3 of 3 10-08-2019, 22:53
TCS NQT C-MCQ Set - 4 https://www.simpleway2code.me/2019/06/tcs-nqt-c-mcq-set-4...
Ques 1. What will be the output of the below program if the below code is run
with three command line parameters mentioned below:
#include
int main(int argc, char ** argv){
char **items;
int j = 3, i;
items = argv;
for(i = 1; (i%4); i++){
int **p = &items[j];
printf("%c", **p);
j--;
}
return 0;
}
a) PIP
Ques 2. What is the data type that occupies the least storage in “C” language?
Please give the answer in the blank line: __________
char
1 of 4 10-08-2019, 22:53
TCS NQT C-MCQ Set - 4 https://www.simpleway2code.me/2019/06/tcs-nqt-c-mcq-set-4...
a) Linked list
b) No, she can not compile as the main function is required to compile any C
program file.
Ques 7. The difference between variable declaration and variable definition is:
d) Declaration associates type to the variable whereas definition gives the value
to the variable.
Ques 8. The inorder and preorder traversal of a binary tree are d b e a f c g and a
b d e c f g, respectively. The post-order traversal of the binary tree is:
a) d e b f g c a
#include<stdio.h>
int main()
{
int x, y;
for(x=5;x>=1;x--)
{
for(y=1;y<=x;y++)
printf("%d\n",y);
}
}
A. 15
2 of 4 10-08-2019, 22:53
TCS NQT C-MCQ Set - 4 https://www.simpleway2code.me/2019/06/tcs-nqt-c-mcq-set-4...
Ques 10. The longest common subsequence (LCS) problem is the problem of finding
the longest subsequence common to a set of sequences (often just two sequences).
A subsequence is a sequence that can be derived from another sequence by
deleting some or no elements without changing the order of the remaining
elements. One form of implementation of LCS function is given below. The function
takes as input sequences X[1…m] and Y[1…n], computes the length of the Longest
common subsequence between X[1..i] and Y[1..j] for all 1<i < m and 1< j < n, and
stores it in C[i,j]. C[m,n] will contain the length of the LCS of X and Y.
Eesha used the above algorithm to calculate the LCS length between “kitten” and
“string”. What was the result she got? Please give the answer in the blank line.
___________
REACTIONS
POSTED BY HRISHABH
3 of 4 10-08-2019, 22:53
TCS NQT C-MCQ Set - 4 https://www.simpleway2code.me/2019/06/tcs-nqt-c-mcq-set-4...
4 of 4 10-08-2019, 22:53
TCS NQT C-MCQ Set - 5 https://www.simpleway2code.me/2019/06/tcs-nqt-c-mcq-set-5...
Ques 1. Eesha wrote a recursive function that takes the first node in a linked
list as an argument, reverses the list, returning the first Node in the result. The
pseudo code for this function is given below. However, she did not get the
correct result. In which line number did she make a mistake?
return rest
Explanation
477767
int (*ptr)[10];
1 of 4 10-08-2019, 22:53
TCS NQT C-MCQ Set - 5 https://www.simpleway2code.me/2019/06/tcs-nqt-c-mcq-set-5...
int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;
m = a[i++];
printf("%d, %d, %d", i, j, m);
return 0;
}
C. 3, 2, 15
Explanation
2 of 4 10-08-2019, 22:53
TCS NQT C-MCQ Set - 5 https://www.simpleway2code.me/2019/06/tcs-nqt-c-mcq-set-5...
B. No
Explanation
Ques 7. Are the expressions arr and &arr same for an array of 10 integers?
B. No
Explanation
Explanation
3 of 4 10-08-2019, 22:53
TCS NQT C-MCQ Set - 5 https://www.simpleway2code.me/2019/06/tcs-nqt-c-mcq-set-5...
REACTIONS
POSTED BY HRISHABH
Unknown
Hrishabh
4 of 4 10-08-2019, 22:53