C Programming Fundamentals
Test your knowledge of C programming concepts including string handling, character functions, pointers, and bitwise operators
Questions
Question 1 Multiple Choice (Single Answer)
What will be the result of the following expression in C?
x=strcmpi(&&ABC&&,&&abc&&);
printf(&&x=%d&&,x);
- x=1
- x=0
- x=2
- x=3
- none of these
Question 2 Multiple Choice (Single Answer)
Which of the following character types of functions in C is used to verify whether inputted characters are in uppercase or not?
- toupper()
- isupper()
- tolower()
- isdigit()
- isalpha()
Question 3 Multiple Choice (Single Answer)
What will be the output of the following C code?
void main()
{
int *ptr=&"&Chennai&"&;
printf(&"&%c&"&,++(ptr++));
}
- C
- d
- e
- a
- i
Question 4 Multiple Choice (Single Answer)
Which of the following string handling functions in C is used to reverse the characters in a string?
- strupr()
- strlen()
- strrev()
- strcpy()
- strcat()
Question 5 Multiple Choice (Single Answer)
What will be the value of 'a' in the following C code?
int a=5;
printf(&"&a=%d&"&,a&2);
- a=5
- a=1
- a=2
- a=0
- a=3