Beginners sections
So we hope you are prepared enough to attempt the below section !
1. The keyword used to transfer control from a function back to the calling function is
A.switch B.goto C.go back D.return
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2.What is the notation for following functions?
1. int f(int a, float b)
{
/* Some code */
}
2. int f(a, b)
int a;
float b;
{
/* Some code */
}
A.1. KR Notation
2. ANSI Notation
B.1. Pre ANSI C Notation
2. KR Notation
C.1. ANSI Notation
2. KR Notation
D.1. ANSI Notation
2. Pre ANSI Notation
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3.Which of the following function sets first n characters of a string to a given character?
A.strinit() B.strnset() C.strset() D.strcset()
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4.Which of the following function is used to find the first occurrence of a given string in another string?
A.strchr() B.strrchr() C.strstr() D.strnset()
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
5.Can you combine the following two statements into one?
char *p; p = (char*) malloc(100);
A.char p = *malloc(100);B.char *p = (char) malloc(100);C.char *p = (char*)malloc(100);
char *p = (char *)(malloc*)(100);
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
A.switch B.goto C.go back D.return
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2.What is the notation for following functions?
1. int f(int a, float b)
{
/* Some code */
}
2. int f(a, b)
int a;
float b;
{
/* Some code */
}
A.1. KR Notation
2. ANSI Notation
B.1. Pre ANSI C Notation
2. KR Notation
C.1. ANSI Notation
2. KR Notation
D.1. ANSI Notation
2. Pre ANSI Notation
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3.Which of the following function sets first n characters of a string to a given character?
A.strinit() B.strnset() C.strset() D.strcset()
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4.Which of the following function is used to find the first occurrence of a given string in another string?
A.strchr() B.strrchr() C.strstr() D.strnset()
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
5.Can you combine the following two statements into one?
char *p; p = (char*) malloc(100);
A.char p = *malloc(100);B.char *p = (char) malloc(100);C.char *p = (char*)malloc(100);
char *p = (char *)(malloc*)(100);
---------------------------------------------------------------------------------------------------------------------------------------------------------------------