Class 6 Exam  >  Class 6 Questions  >  Which of the following format identifier can ... Start Learning for Free
Which of the following format identifier can never be used for the variable var?
#include <stdio.h>
    int main()
    {
        char *var = "Advanced Training in C by Sanfoundry.com";
    }
  • a)
    %f
  • b)
    %d
  • c)
    %c
  • d)
    %s
Correct answer is option 'A'. Can you explain this answer?
Most Upvoted Answer
Which of the following format identifier can never be used for the var...
Explanation:

Data Types:
- The variable var is of type char* which is a pointer to a character.

Format Identifiers:
- Format identifiers are used in printf and scanf functions to specify the type of variable being passed.
- %s is used to print a string of characters.

Invalid Format Identifier:
- The format identifier %) is invalid and cannot be used for the variable var.
- The correct format identifier for a character pointer is %s which is used to print a string.

Conclusion:
- The format identifier %) can never be used for the variable var as it is not a valid format specifier for a character pointer.
Free Test
Community Answer
Which of the following format identifier can never be used for the var...
%c can be used to print the indexed position.
%d can still be used to display its ASCII value.
%s is recommended.
%f cannot be used for the variable var.
Attention Class 6 Students!
To make sure you are not studying endlessly, EduRev has designed Class 6 study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Class 6.
Explore Courses for Class 6 exam

Top Courses for Class 6

Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer?
Question Description
Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer? for Class 6 2024 is part of Class 6 preparation. The Question and answers have been prepared according to the Class 6 exam syllabus. Information about Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Class 6 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer?.
Solutions for Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Class 6. Download more important topics, notes, lectures and mock test series for Class 6 Exam by signing up for free.
Here you can find the meaning of Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following format identifier can never be used for the variable var?#include <stdio.h> int main() { char *var = "Advanced Training in C by Sanfoundry.com"; }a)%fb)%dc)%cd)%sCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Class 6 tests.
Explore Courses for Class 6 exam

Top Courses for Class 6

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev