Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

C | String | Question 7

  • Last Updated : 28 Jun, 2021

In below program, what would you put in place of “?” to print “Quiz”?

Take a step-up from those "Hello World" programs. Learn to implement data structures like Heap, Stacks, Linked List and many more! Check out our Data Structures in C course to start learning today.




#include <stdio.h>
int main() 
  char arr[] = "GeeksQuiz"
  printf("%s", ?); 
  return 0; 
}

(A) arr
(B) (arr+5)
(C) (arr+4)
(D) Not possible


Answer: (B)

Explanation: Since %s is used, the printf statement will print everything starting from arr+5 until it finds ‘\0’

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :