Question
#include <stdio.h>
void main(){
char c[] = "GATE2011";
char *p =c;
printf("%s", p + p[3] - p[1]);
}
a.
GATE2011
b.
E2011
c.
2011
d.
11
Posted under C Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. Enumeration (or enum) is a ______ data type in C.
View solution
Q. If we do not explicitly assign values to enum names, the compiler by default assigns values to ?
View solution
Q. All enum constants are
View solution
Q. String handling functions such as strcmp(), strcpy() etc can be used with enumerated types.
View solution
Q. Pick the incorrect statement with respect to enums.
View solution
Q. Arithmetic operations are not allowed on enumerated constants.
View solution
Q. What is the correct syntax of enum?
View solution
Q. What is a String in C Language?
View solution
Q. What is the Format specifier used to print a String or Character array in C Printf or Scanf function?
View solution
Q. What is the maximum length of a C String?
View solution
Q. How do you accept a Multi Word Input in C Language?
View solution
Q. Choose a correct C Statement about Strings.
View solution
Q. What is the ASCII value of NULL or \0?
View solution
Q. A character constant is enclosed by
View solution
Q. A C string elements are always stored in
View solution
Q. Choose a correct C statement about String functions?
View solution
Q. What is actually passed to PRINTF or SCANF functions?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!