SlideShare a Scribd company logo
1 of 1
Download to read offline
C Language Problem
Please Explain Show which of the following are valid and which are invalid identifiers: Why?
run_1 2run double Char double-trouble two-four
Solution
Rules For Constructing Variable Name
Characters Allowed :
Underscore(_)
Capital Letters ( A – Z )
Small Letters ( a – z )
Digits ( 0 – 9 )
Blanks & Commas are not allowed
No Special Symbols other than underscore(_) are allowed
First Character should be alphabet or Underscore
Variable name Should not be Reserved Word
Answer:
run_1 : valid
2run: Invalid => identifier name can not start with digit
double : Invalid => it is keyword in C
Char : valid
double-trouble :Invalid => identifier name can not contains '-' character
two*four : Invalid => can not contain *

More Related Content

More from sales96

Philosophy questionExplain the principle known as Ockhams Razor..pdf
Philosophy questionExplain the principle known as Ockhams Razor..pdfPhilosophy questionExplain the principle known as Ockhams Razor..pdf
Philosophy questionExplain the principle known as Ockhams Razor..pdf
sales96
 
Explain, in your own words, the concept of cloud computing. Do you b.pdf
Explain, in your own words, the concept of cloud computing. Do you b.pdfExplain, in your own words, the concept of cloud computing. Do you b.pdf
Explain, in your own words, the concept of cloud computing. Do you b.pdf
sales96
 
Discuss why emerging diseases are appearing in industiralized countr.pdf
Discuss why emerging diseases are appearing in industiralized countr.pdfDiscuss why emerging diseases are appearing in industiralized countr.pdf
Discuss why emerging diseases are appearing in industiralized countr.pdf
sales96
 

More from sales96 (20)

Suppose the tree diagram below represents all the students in a high .pdf
Suppose the tree diagram below represents all the students in a high .pdfSuppose the tree diagram below represents all the students in a high .pdf
Suppose the tree diagram below represents all the students in a high .pdf
 
Select all the functions below that are the primary responsibilities .pdf
Select all the functions below that are the primary responsibilities .pdfSelect all the functions below that are the primary responsibilities .pdf
Select all the functions below that are the primary responsibilities .pdf
 
QUESTION 1 Prophage is a viral particle that cannot produce phages. O.pdf
QUESTION 1 Prophage is a viral particle that cannot produce phages. O.pdfQUESTION 1 Prophage is a viral particle that cannot produce phages. O.pdf
QUESTION 1 Prophage is a viral particle that cannot produce phages. O.pdf
 
Philosophy questionExplain the principle known as Ockhams Razor..pdf
Philosophy questionExplain the principle known as Ockhams Razor..pdfPhilosophy questionExplain the principle known as Ockhams Razor..pdf
Philosophy questionExplain the principle known as Ockhams Razor..pdf
 
Mycoplasma is a genus of bacteria that do not have a cell wall. Woul.pdf
Mycoplasma is a genus of bacteria that do not have a cell wall. Woul.pdfMycoplasma is a genus of bacteria that do not have a cell wall. Woul.pdf
Mycoplasma is a genus of bacteria that do not have a cell wall. Woul.pdf
 
LinguisticsExercise 1. For each pair of sentences X and Y below, s.pdf
LinguisticsExercise 1. For each pair of sentences X and Y below, s.pdfLinguisticsExercise 1. For each pair of sentences X and Y below, s.pdf
LinguisticsExercise 1. For each pair of sentences X and Y below, s.pdf
 
A department at a university plans to recruit a new faculty member. T.pdf
A department at a university plans to recruit a new faculty member. T.pdfA department at a university plans to recruit a new faculty member. T.pdf
A department at a university plans to recruit a new faculty member. T.pdf
 
Informal financial institutions and its system are important in serv.pdf
Informal financial institutions and its system are important in serv.pdfInformal financial institutions and its system are important in serv.pdf
Informal financial institutions and its system are important in serv.pdf
 
How to get pure culture from mixed sampleHow to get pure culture.pdf
How to get pure culture from mixed sampleHow to get pure culture.pdfHow to get pure culture from mixed sampleHow to get pure culture.pdf
How to get pure culture from mixed sampleHow to get pure culture.pdf
 
How does insulin binding activate the insulin receptor List the ste.pdf
How does insulin binding activate the insulin receptor List the ste.pdfHow does insulin binding activate the insulin receptor List the ste.pdf
How does insulin binding activate the insulin receptor List the ste.pdf
 
Given the tree what morphological characteristics do you expect to b.pdf
Given the tree what morphological characteristics do you expect to b.pdfGiven the tree what morphological characteristics do you expect to b.pdf
Given the tree what morphological characteristics do you expect to b.pdf
 
Explain, in your own words, the concept of cloud computing. Do you b.pdf
Explain, in your own words, the concept of cloud computing. Do you b.pdfExplain, in your own words, the concept of cloud computing. Do you b.pdf
Explain, in your own words, the concept of cloud computing. Do you b.pdf
 
Explain the intercellular junctions found on the lateral surface of .pdf
Explain the intercellular junctions found on the lateral surface of .pdfExplain the intercellular junctions found on the lateral surface of .pdf
Explain the intercellular junctions found on the lateral surface of .pdf
 
Explain how density, dispersion, and demographics, mortality, and su.pdf
Explain how density, dispersion, and demographics, mortality, and su.pdfExplain how density, dispersion, and demographics, mortality, and su.pdf
Explain how density, dispersion, and demographics, mortality, and su.pdf
 
Environmental engineering Q3 Discuss the formal classification of .pdf
Environmental engineering Q3 Discuss the formal classification of .pdfEnvironmental engineering Q3 Discuss the formal classification of .pdf
Environmental engineering Q3 Discuss the formal classification of .pdf
 
Discuss how bones are classified according to shape. Given at least o.pdf
Discuss how bones are classified according to shape. Given at least o.pdfDiscuss how bones are classified according to shape. Given at least o.pdf
Discuss how bones are classified according to shape. Given at least o.pdf
 
Due to similar selection pressure, several metatherians and eutheria.pdf
Due to similar selection pressure, several metatherians and eutheria.pdfDue to similar selection pressure, several metatherians and eutheria.pdf
Due to similar selection pressure, several metatherians and eutheria.pdf
 
Discus this topic..A nuclear reactor generates heat in the fuel ro.pdf
Discus this topic..A nuclear reactor generates heat in the fuel ro.pdfDiscus this topic..A nuclear reactor generates heat in the fuel ro.pdf
Discus this topic..A nuclear reactor generates heat in the fuel ro.pdf
 
Discuss why emerging diseases are appearing in industiralized countr.pdf
Discuss why emerging diseases are appearing in industiralized countr.pdfDiscuss why emerging diseases are appearing in industiralized countr.pdf
Discuss why emerging diseases are appearing in industiralized countr.pdf
 
Diastrophic dysplasia- Is an inherited autosomal recessive manner. D.pdf
Diastrophic dysplasia- Is an inherited autosomal recessive manner. D.pdfDiastrophic dysplasia- Is an inherited autosomal recessive manner. D.pdf
Diastrophic dysplasia- Is an inherited autosomal recessive manner. D.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 

C Language ProblemPlease Explain Show which of the following are v.pdf

  • 1. C Language Problem Please Explain Show which of the following are valid and which are invalid identifiers: Why? run_1 2run double Char double-trouble two-four Solution Rules For Constructing Variable Name Characters Allowed : Underscore(_) Capital Letters ( A – Z ) Small Letters ( a – z ) Digits ( 0 – 9 ) Blanks & Commas are not allowed No Special Symbols other than underscore(_) are allowed First Character should be alphabet or Underscore Variable name Should not be Reserved Word Answer: run_1 : valid 2run: Invalid => identifier name can not start with digit double : Invalid => it is keyword in C Char : valid double-trouble :Invalid => identifier name can not contains '-' character two*four : Invalid => can not contain *