A Developer Journey who codes for fun

Daily Dose Of Code

  • Home
  • Dot.Net Basics
    • .Net Basics
      • CTS
      • CLS
      • CLR
      • Strong Vs Weak Ref
      • .Net Framework
      • What is Manifest
    • Memory Management
      • Garbage Collection 1
      • Garbage Collection 2
      • Circular Reference
  • C Sharp
    • Abstract Class in C#
    • Interfaces in C#
    • Value type by Val and By Ref
    • Var keyword
    • Null Coalescing Operator
    • Buit-in code snippets
  • OOPS
    • Abstraction and Encapsulation
    • Polymorphism
    • Inheritence
    • Aggregation
  • Threading
    • Delegates
      • Calling Delegate using Invoke, BeginInvoke
      • Multicast Delegate
      • Exception Handling in Multicast Delegate
      • Action
      • Predicate
      • Func
    • Synchronization
    • Thread Pool
    • Exception Handling
    • TPL
  • Design Pattern
    • Creational Patterns
      • Singleton Pattern
      • Factory Pattern
      • Abstract Factory Pattern
      • Prototype Pattern
      • Builder Pattern
    • Structural Patterns
      • Adapter Pattern
      • Bridge Pattern
      • Composite Pattern
      • Proxy Pattern
      • Facade Pattern
      • Decorator Pattern
      • Flyweight Pattern
    • Behavioral Patterns
      • Command Pattern
      • Interpreter Pattern
      • Iterator Pattern
      • Mediator Pattern
      • Memento Pattern
      • Observer Pattern
      • State Pattern
      • Strategy Pattern
      • Visitor Pattern
      • Chain Of Responsibility Pattern
      • Template Pattern
  • Data Structures
    • Generic List in C#
    • 2d array to 1d array
    • 3d arrayto 1d array
    • Linked List
      • Singly Linked List in C#
    • Queue
      • Dummy Data 1
    • Stack
      • Dummy Data 2
    • Tree
      • Dummy Data 3
    • Graph
      • Dummy Data 4
  • WCF
    • WCF Service using VS 2015
  • Scripts
    • Chrome Extensions
      • Create a Chrome Extension
      • Facebook autologout script
      • Gmail autologout script

C code to Check the string has valid identifier or not in.

 Unknown     6:28 AM     30 comments   

#include
#include
#include

char keyword[][10]={"auto","break","case","char","const","continue","default","printf", "double","else","enum","extern","float","for","goto","if","int","do", "long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"};

#define SIZE 25

int main()
{
char str[SIZE];
int len,i,flag=0;
printf("Enter The C Identifier :> ");
gets(str);

for( i = 0 ; i <= 32 ; i++ )
{
if(strcmp(str,keyword[i])==0)
{
printf(" Given string is invalid identifier\n");
exit(0);
}
}
if( str[0]=='_' || isalpha(str[0]) )
{
flag=1;
len=strlen(str);
for(i = 1 ; i < len ; i++ )
{
if( str[i]=='_' || isalpha(str[i]) || isdigit(str[i]) )
continue;
else
{
flag=0;
//printf(" H!!!!!!!! ");
break;
}
}
}

if( flag == 1 )
printf("Given string is a valid C Identifier\n");
else
printf("Given string is invalid C identifier\n");
return 0;
}
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook

Related Posts:

  • What are different types of JIT ?In .net there are three type of JIT.JIT compiler is a part of the runtime execution environment.Three JIT are following :-Pre-JIT :- Pre-JIT compiles … Read More
  • What is Manifest in .net ?An assembly manifest contains all the metadata.It means Assembly metadata is stored in Manifest and it needed to specify the assembly's version requir… Read More
  • How to copy the text from label in window form at run time ?Designer view:#region DesignerViewCreate a context menu strip :this.copyPathMenuItem = new System.Windows.Forms.ToolStripMenuItem();this.labelContextM… Read More
  • Basics of .Net (What is IL,CLR,CTS,CLS ?)1: IL(Intermediate Language) :-(IL)Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language)… Read More
  • How to view a Assembly of your code (What is ILDASM ?)When it comes to understanding of internals nothing can beat ILDASM. ILDASM basically converts the whole exe or dll in to IL code. To run ILDASM you h… Read More
Newer Post Older Post Home

30 comments:

  1. Emrah12September 27, 2023 at 3:26 AM

    Bursa
    Kırşehir
    Muş
    Mersin
    Çanakkale
    2MD

    ReplyDelete
    Replies
      Reply
  2. KenarındaSeptember 28, 2023 at 9:59 AM

    Afyon
    Antalya
    Erzurum
    Mersin
    izmir
    5XH

    ReplyDelete
    Replies
      Reply
  3. LightningStrike17September 29, 2023 at 4:30 PM

    Muğla
    Samsun
    Eskişehir
    Sakarya
    Kars
    3Q23T5

    ReplyDelete
    Replies
      Reply
  4. InfernoFrostfireXSeptember 29, 2023 at 5:01 PM

    Mardin
    istanbul
    Çanakkale
    Antep
    Elazığ
    0R6

    ReplyDelete
    Replies
      Reply
  5. InfinityBender42September 30, 2023 at 4:55 PM

    Antalya
    Antep
    Burdur
    Sakarya
    istanbul
    01N

    ReplyDelete
    Replies
      Reply
  6. StarshipPhantom101October 8, 2023 at 8:11 AM

    görüntülüshow
    ücretli show
    0NPZ

    ReplyDelete
    Replies
      Reply
  7. Erdal5October 20, 2023 at 8:52 PM

    Çorum Lojistik
    Karaman Lojistik
    Gümüşhane Lojistik
    Denizli Lojistik
    Artvin Lojistik
    D3HCJK

    ReplyDelete
    Replies
      Reply
  8. BinarySerpentXYOLG129October 21, 2023 at 5:25 PM

    malatya evden eve nakliyat
    artvin evden eve nakliyat
    kocaeli evden eve nakliyat
    ankara evden eve nakliyat
    düzce evden eve nakliyat
    6X5Vİ

    ReplyDelete
    Replies
      Reply
  9. 5E896Jamiya59FE0November 8, 2023 at 5:36 AM

    B15D2
    Bilecik Parça Eşya Taşıma
    Burdur Evden Eve Nakliyat
    Bayburt Evden Eve Nakliyat
    Kırşehir Parça Eşya Taşıma
    Yalova Parça Eşya Taşıma

    ReplyDelete
    Replies
      Reply
  10. 50002JadeDDFE7November 9, 2023 at 11:02 PM

    860B1
    Kilis Evden Eve Nakliyat
    Diyarbakır Parça Eşya Taşıma
    Sinop Evden Eve Nakliyat
    Aksaray Evden Eve Nakliyat
    Iğdır Lojistik
    Mardin Parça Eşya Taşıma
    Kırıkkale Şehir İçi Nakliyat
    Çanakkale Şehirler Arası Nakliyat
    Karapürçek Boya Ustası

    ReplyDelete
    Replies
      Reply
  11. F5622Jayvion3192DNovember 10, 2023 at 9:58 AM

    324A4
    Antalya Rent A Car
    Bayburt Evden Eve Nakliyat
    Vindax Güvenilir mi
    Çankaya Fayans Ustası
    Ankara Lojistik
    Altındağ Parke Ustası
    İzmir Evden Eve Nakliyat
    Aksaray Lojistik
    Batman Şehirler Arası Nakliyat

    ReplyDelete
    Replies
      Reply
  12. 5CF81DannyD44A7November 13, 2023 at 5:25 AM

    7FF84
    Hamster Coin Hangi Borsada
    Arg Coin Hangi Borsada
    Antalya Şehir İçi Nakliyat
    İstanbul Lojistik
    Anc Coin Hangi Borsada
    Yalova Şehirler Arası Nakliyat
    Lunc Coin Hangi Borsada
    Altındağ Boya Ustası
    Yenimahalle Parke Ustası

    ReplyDelete
    Replies
      Reply
  13. 70623Dominique04638December 22, 2023 at 9:04 PM

    CD41A
    elazığ rastgele sohbet uygulaması
    bedava sohbet
    niğde goruntulu sohbet
    sesli sohbet odası
    kocaeli canlı sohbet et
    sakarya rastgele görüntülü sohbet
    kütahya rastgele sohbet odaları
    rize sesli sohbet mobil
    ordu ücretsiz sohbet uygulamaları

    ReplyDelete
    Replies
      Reply
  14. CF6C6ScarlettB0008January 4, 2024 at 1:53 PM

    16812
    adıyaman mobil sohbet odaları
    Amasya Canlı Sohbet
    siirt ücretsiz sohbet
    tunceli kadınlarla ücretsiz sohbet
    muş ücretsiz sohbet uygulamaları
    rastgele sohbet
    kırıkkale rastgele görüntülü sohbet uygulaması
    afyon kızlarla rastgele sohbet
    Karabük Canlı Sohbet

    ReplyDelete
    Replies
      Reply
  15. 36E88Luis887F1January 19, 2024 at 5:47 AM

    358A3
    Sui Coin Hangi Borsada
    Flare Coin Hangi Borsada
    Coin Kazanma Siteleri
    Bitcoin Oynama
    Parasız Görüntülü Sohbet
    Alya Coin Hangi Borsada
    Onlyfans Beğeni Satın Al
    Youtube Beğeni Hilesi
    Binance Borsası Güvenilir mi

    ReplyDelete
    Replies
      Reply
  16. AEC9FAndrew4F790January 20, 2024 at 9:10 AM

    9BF18
    Tumblr Beğeni Satın Al
    Area Coin Hangi Borsada
    Mefa Coin Hangi Borsada
    Instagram Beğeni Hilesi
    Görüntülü Sohbet Parasız
    Soundcloud Beğeni Hilesi
    Coin Nasıl Çıkarılır
    Coin Kazma Siteleri
    Coin Nasıl Oynanır

    ReplyDelete
    Replies
      Reply
  17. AnonymousSeptember 12, 2024 at 12:44 AM

    GHJNMKJHK,MUHJ
    شركة تسليك مجاري الخبر

    ReplyDelete
    Replies
      Reply
  18. AnonymousOctober 2, 2024 at 1:55 AM

    صيانة الافران DAs3AJlxLk

    ReplyDelete
    Replies
      Reply
  19. AnonymousOctober 5, 2024 at 4:53 AM

    شركة مكافحة حشرات بالجبيل MktGkVDnOy

    ReplyDelete
    Replies
      Reply
  20. AnonymousNovember 9, 2024 at 5:59 AM

    مكافحة حشرات jThWmspgXS

    ReplyDelete
    Replies
      Reply
  21. AnonymousNovember 9, 2024 at 8:01 AM

    صيانة افران الغاز بمكة yUI5BoBUfk

    ReplyDelete
    Replies
      Reply
  22. AnonymousNovember 10, 2024 at 1:21 AM

    شركة عزل خزانات المياه Doj1P5VRBt

    ReplyDelete
    Replies
      Reply
  23. AnonymousNovember 25, 2024 at 11:27 PM

    تسليك مجاري بالاحساء rVI6iMA41R

    ReplyDelete
    Replies
      Reply
  24. AnonymousDecember 1, 2024 at 5:39 AM

    شركة تسليك مجاري بالاحساء 3s8Mx2XGIl

    ReplyDelete
    Replies
      Reply
  25. AnonymousDecember 11, 2024 at 1:50 AM

    شركة عزل اسطح بالرياض LLj6aRpb6I

    ReplyDelete
    Replies
      Reply
  26. EC301035BEZen987681847EDecember 28, 2024 at 11:34 PM

    EEA53F2EB1
    tiktok takipçi

    ReplyDelete
    Replies
      Reply
  27. 09F978ADE8Victor7B008DE8CEDecember 30, 2024 at 1:13 PM

    744B95FDD1
    türk takipçi

    ReplyDelete
    Replies
      Reply
  28. AnonymousFebruary 1, 2025 at 2:18 AM

    9CF425DABC
    instagram türk aktif takipçi

    ReplyDelete
    Replies
      Reply
  29. AnonymousFebruary 9, 2025 at 6:01 AM

    شركة تنظيف منازل بخميس مشيط
    nxmhSmdxru

    ReplyDelete
    Replies
      Reply
  30. AnonymousMay 15, 2025 at 2:27 PM

    BAA26010FB
    twitter düşmeyen takipçi
    youtube beğeni satın al
    telafili takipçi
    türk takipçi
    ucuz takipçi

    ReplyDelete
    Replies
      Reply
Add comment
Load more...

About The Author

Unknown
View my complete profile

Total Pageviews

84559

Popular Posts

  • Clr - Common Language Runtime
    .Net framework provides a run time environment - CLR. Common language runtime takes the IL code from the compiler( language specific) and p...
  • Auto logout chrome extension for Gmail
    Hello Friends, In the last article we learned to create a sample chrome extension. Here we are going to create auto logout Gmail script as...
  • Predicate delegate in C#
    Hello Everyone, In the article we will talk about Predicate delegate. Predicate is also a delegate which encapsulate a method that takes...
  • .Net Framework overview
    Hello friends : Here i am writing my first article on .Net framework anyways....So the question is What is .Net Framework ? The .Net fram...
  • Nagarro Placement Papers..
    Ques.1 :- Seat Reservation prog for the theatre. Write a function for seat allocation for the movie tickets. Total no of seats available are...
  • What does it mean by disconnected data access architecture of ADO.Net?
    ADO.Net introduces the concept of disconnected data architecture. In traditional data access components, you make a connection to the databa...
  • Calling the Delegates using Invoke(), BeginInvoke() and DynamicInvoke() ?
    Hello Guys, So in the last article we talked about What is delegate and how can we create a delegate. In this article we will discuss w...
  • C code to Check the string has valid identifier or not in.
    #include #include #include char keyword[][10]={"auto","break","case","char","const","...
  • Garbage Collection - Automatic Memory Management Part II
    Welcome friends in the second article of Garbage Collection. Those who have missed the first one can visit here . So in this article i will...
  • Delegates in C Sharp
    A Delegate is a type variable that holds the reference to a method. Delegates are similar to Pointer to functions in C and C++ When we...

Blog Archive

  • ►  2016 (4)
    • ►  September (2)
      • ►  Sep 03 (2)
    • ►  August (1)
      • ►  Aug 28 (1)
    • ►  April (1)
      • ►  Apr 24 (1)
  • ►  2015 (12)
    • ►  September (10)
      • ►  Sep 30 (1)
      • ►  Sep 29 (1)
      • ►  Sep 28 (1)
      • ►  Sep 27 (2)
      • ►  Sep 26 (3)
      • ►  Sep 20 (1)
      • ►  Sep 19 (1)
    • ►  August (1)
      • ►  Aug 16 (1)
    • ►  March (1)
      • ►  Mar 31 (1)
  • ►  2013 (10)
    • ►  June (1)
      • ►  Jun 16 (1)
    • ►  April (1)
      • ►  Apr 21 (1)
    • ►  February (8)
      • ►  Feb 18 (3)
      • ►  Feb 17 (2)
      • ►  Feb 16 (2)
      • ►  Feb 15 (1)
  • ►  2012 (1)
    • ►  May (1)
      • ►  May 27 (1)
  • ►  2010 (22)
    • ►  October (14)
      • ►  Oct 21 (1)
      • ►  Oct 06 (12)
      • ►  Oct 04 (1)
    • ►  April (2)
      • ►  Apr 22 (1)
      • ►  Apr 16 (1)
    • ►  March (1)
      • ►  Mar 30 (1)
    • ►  January (5)
      • ►  Jan 08 (3)
      • ►  Jan 01 (2)
  • ▼  2009 (110)
    • ►  December (8)
      • ►  Dec 18 (2)
      • ►  Dec 05 (1)
      • ►  Dec 04 (5)
    • ►  November (1)
      • ►  Nov 27 (1)
    • ►  October (14)
      • ►  Oct 09 (4)
      • ►  Oct 07 (1)
      • ►  Oct 06 (3)
      • ►  Oct 05 (3)
      • ►  Oct 01 (3)
    • ►  September (17)
      • ►  Sep 30 (1)
      • ►  Sep 29 (1)
      • ►  Sep 28 (1)
      • ►  Sep 25 (1)
      • ►  Sep 24 (1)
      • ►  Sep 17 (2)
      • ►  Sep 15 (3)
      • ►  Sep 11 (2)
      • ►  Sep 09 (3)
      • ►  Sep 08 (2)
    • ►  August (31)
      • ►  Aug 31 (1)
      • ►  Aug 27 (3)
      • ►  Aug 26 (1)
      • ►  Aug 25 (2)
      • ►  Aug 24 (1)
      • ►  Aug 22 (2)
      • ►  Aug 21 (3)
      • ►  Aug 20 (2)
      • ►  Aug 19 (3)
      • ►  Aug 18 (1)
      • ►  Aug 16 (1)
      • ►  Aug 12 (2)
      • ►  Aug 11 (1)
      • ►  Aug 10 (3)
      • ►  Aug 07 (4)
      • ►  Aug 06 (1)
    • ►  July (24)
      • ►  Jul 25 (4)
      • ►  Jul 24 (20)
    • ▼  April (15)
      • ►  Apr 10 (3)
      • ▼  Apr 07 (9)
        • Nagarro Placement Papers..
        • C Aptitude Questions...
        • C code to Check the string has valid identifier or...
        • Code for matrix problem in C++
        • Implementation of a queue in C++
        • A linked list program in C++
        • OOPS Concepts..
        • OOPS Concepts...
        • 1. What is virtual constructors/destructors?Virtua...
      • ►  Apr 06 (3)

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments
copyright @ TechGiant 2015. Powered by Blogger.

Disclaimer

This is my personal blog and i write articles on .Net, WPF, C#, OOPS, Threading and other .Net technologies. This is not related to any of my employer and organizations. This is the result of my personal interest.

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Followers

Copyright © 2025 A Developer Journey who codes for fun | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com