Programming in C

C programming language standard library functions and pointer operations

5 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the given operations of the function is not true for that function?

  1. Getchar() reads one character at a time till the user presses enter.
  2. Putchar() prints one character on the screen, which is read by the standard input.
  3. Getch() reads alphanumeric character from the input device.
  4. Getch() returns the character entered as input is not displayed by it.
  5. 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?

  1. Strpbrk ();
  2. Strbrk ();
  3. Strnicmp ();
  4. Strncmp ();
  5. 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();
}

  1. The result comes out to be 0111.
  2. The result comes out to be 1111.
  3. The result comes out to be 1000.
  4. The result comes out to be 0110.
  5. Error in the program
Question 4 Multiple Choice (Single Answer)

Which of the following standard functions accepts two arguments while calling?

  1. Strspn();
  2. Strnset();
  3. Strnsetu();
  4. Strdup();
  5. Strncpy();
Question 5 Multiple Choice (Single Answer)

Which of the following arithmetic operations with the addresses is not possible in C language?

  1. Addition of two addresses
  2. Multiplication of two addresses
  3. Multiplication of an address with a constant
  4. Divison of an address with a constant
  5. All of the above