---------------------------------------------------------------------------------------------------------
Previous Page Home Last Page
---------------------------------------------------------------------------------------------------------
6.
What will be the output of the program ?
#include
#include
int main()
{
char str1[20] = "Hello", str2[20] = " World";
printf("%s\n", strcpy(str2, strcat(str1, str2)));
return 0;
}
A. Hello
B. World
C. Hello World
D. WorldHello
Answer: C
---------------------------------------------------------------------------------------------------------
7.
What will be the output of the program ?
#include
int main()
{
printf(5+"Good Morning\n");
return 0;
}
A. Good Morning
B. Good
C. M
D. Morning
Answer: D
--------------------------------------------------------------------------------------------------------
8.
Which standard library function will you use to find the last occurance of a character in a string in C?
A. strnchar()
B. strchar()
C. strrchar()
D. strrchr()
Answer: D
---------------------------------------------------------------------------------------------------------
9.
What do the following declaration signify?
char **argv;
A. argv is a pointer to pointer.
B. argv is a pointer to a char pointer.
C. argv is a function pointer.
D. argv is a member of function pointer.
Answer: B
--------------------------------------------------------------------------------------------------------
10.
Which directory the compiler first looks for the file when using #include?
A. Current directory where program is saved
B. C:COMPILERINCLUDE
C. S:SOURCEHEADERS
D. Both (b) and (c) simultaneously
Answer: B
-------------------------------------------------------------------------------------------------------
Previous Page Home Next Page
-------------------------------------------------------------------------------------------------------
More Imp Topics:
Array
Preprocessor
Structures
Control Structures
Switch Case
Printf
Variables
File Handling
Previous Page Home Last Page
---------------------------------------------------------------------------------------------------------
6.
What will be the output of the program ?
#include
#include
int main()
{
char str1[20] = "Hello", str2[20] = " World";
printf("%s\n", strcpy(str2, strcat(str1, str2)));
return 0;
}
A. Hello
B. World
C. Hello World
D. WorldHello
Answer: C
---------------------------------------------------------------------------------------------------------
7.
What will be the output of the program ?
#include
int main()
{
printf(5+"Good Morning\n");
return 0;
}
A. Good Morning
B. Good
C. M
D. Morning
Answer: D
--------------------------------------------------------------------------------------------------------
8.
Which standard library function will you use to find the last occurance of a character in a string in C?
A. strnchar()
B. strchar()
C. strrchar()
D. strrchr()
Answer: D
---------------------------------------------------------------------------------------------------------
9.
What do the following declaration signify?
char **argv;
A. argv is a pointer to pointer.
B. argv is a pointer to a char pointer.
C. argv is a function pointer.
D. argv is a member of function pointer.
Answer: B
--------------------------------------------------------------------------------------------------------
10.
Which directory the compiler first looks for the file when using #include?
A. Current directory where program is saved
B. C:COMPILERINCLUDE
C. S:SOURCEHEADERS
D. Both (b) and (c) simultaneously
Answer: B
-------------------------------------------------------------------------------------------------------
Previous Page Home Next Page
-------------------------------------------------------------------------------------------------------
More Imp Topics:
Array
Preprocessor
Structures
Control Structures
Switch Case
Printf
Variables
File Handling