Programming in C
C programming language standard library functions and pointer operations
Questions
Question 1 Multiple Choice (Single Answer)
Which of the given operations of the function is not true for that function?
- Getchar() reads one character at a time till the user presses enter.
- Putchar() prints one character on the screen, which is read by the standard input.
- Getch() reads alphanumeric character from the input device.
- Getch() returns the character entered as input is not displayed by it.
- All of the above
Question 2 Multiple Choice (Single Answer)
Which of the following functions is not a standard string function of the C library?
- Strpbrk ();
- Strbrk ();
- Strnicmp ();
- Strncmp ();
- Strstr ();
Question 3 Multiple Choice (Single Answer)
Find the output of the given program or error if any, and give the answer of the program in binary language.
int main()
{
int a=7, b=15, c;
c=a|b;
printf(the result comes out to be is :- %d,c);
getche();
}
- The result comes out to be 0111.
- The result comes out to be 1111.
- The result comes out to be 1000.
- The result comes out to be 0110.
- Error in the program
Question 4 Multiple Choice (Single Answer)
Which of the following standard functions accepts two arguments while calling?
- Strspn();
- Strnset();
- Strnsetu();
- Strdup();
- Strncpy();
Question 5 Multiple Choice (Single Answer)
Which of the following arithmetic operations with the addresses is not possible in C language?
- Addition of two addresses
- Multiplication of two addresses
- Multiplication of an address with a constant
- Divison of an address with a constant
- All of the above