Char type array in c: ক্যারেক্টার টাইপের এক-মাত্রিক অ্যারে হল স্ট্রিং যা নাল (‘\ 0’) দ্বারা সমাপ্ত । অর্থাৎ নাল (‘\ 0’) পেলেই মনে করে স্টিং শেষ।
অ্যারের প্রতিটি অক্ষর মেমরির একটি বাইট দখল করে এবং সর্বশেষ অক্ষরটি সমাপ্তি অক্ষর (‘\ 0’).
আমরা জানি Char type ভেরিয়াবল একটি মাত্র ক্যারেক্টার স্টোর করতে পারে। অতএব, Char type array in c: তে আমরা একটি করে Char স্টোর করতে পারি এবং ফর লুপ ইউজ করে প্রিন্ট করতে পারি।
#include<stdio.h>
int main()
{
char name;
printf("Enter name = ");
scanf("%c", &name);
printf("You Entered name = %c", name);
return 0;
}
Output
Enter name = bncodeing
You Entered name = b
এখানে, শুধু রকটি ক্যারেক্টার নিতে পারছে। চল দেখি কিভাবে একটি ওয়ার্ড, লাইন নিতে পারি।
দুই প্রকার অ্যারে আছে
- ক্যারেক্টার টাইপের অ্যারে
- স্টিং লিটারাল
#include<stdio.h>
int main()
{
char name;
char ch[]={'b', 'n', 'c', 'o', 'd', 'e', 'i', 'n', 'g','\0'};
printf("%s", ch);
return 0;
}
আউটপুট
bncodeing
এখানে, যে ভাবে আমি ডিক্লিয়ার করেছি এটি একটি অ্যারে যার ০ পজিশনে ‘b’, ১ পজিশনে ‘n’, ৩ পজিশনে ‘c’ …………৯ পজিশনে ‘\0’
অ্যারের সাইজ না দিয়েই ডিক্লিয়ার করেছি ইচ্ছা করলে তুমরা সাইজ দিতে পার।
#include<stdio.h>
#include <string.h>
int main(){
char ch[11]={'b', 'n', 'c', 'o', 'd', 'e', 'i', 'n', 'g','\0'};
char ch2[11]="bncodeing";
printf("Char Array Value is: %s\n", ch);
printf("String Literal Value is: %s\n", ch2);
return 0;
}
Output
Char Array Value is: bncodeing
String Literal Value is: bncodeing
চল আমরা একটি শব্দ হতে ভাউয়েল কয়টি কাউন্ট করি
#include<stdio.h>
void main ()
{
char s[10] = "bncodeing";
int i = 0;
int count = 0;
while(s[i] != NULL)
{
if(s[i]=='a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'u' || s[i] == 'o')
{
count ++;
}
i++;
}
printf("The number of vowels %d",count);
}
Output
The number of vowels 3
স্টিং লিটারাল এতে আমরা যে ভাবে স্টিং ইনপুট নিব
#include<stdio.h>
void main ()
{
char s[20];
printf("Enter the string = ");
scanf("%s",s);
printf("You entered= %s",s);
}
Enter the string = bncodeing is best
You entered= bncodeing
%s দিয়ে ইনপুট নিলে স্পেস পেলে নাল ধরে নেয়ে শেষ করে দেয়। চল দেখি কিভাবে একটি লাইন ইনপুট নিতে পারি
#include<stdio.h>
void main ()
{
char s[20];
printf("Enter the string =");
scanf("%[^\n]s",s);
printf("You entered = %s",s);
}
Enter the string =bncodeing is best
You entered = bncodeing is best
টপিক
- স্ট্রিং ফাংশন – strlen() strcpy() strcat() strcmp() strrev() strlwr() strupr() strstr()
- gets() এবং puts() ফাংশন
- ক্যারেক্টার টাইপের অ্যারে এবং স্ট্রিং – সি কোড
- প্যালিনড্রোম কিনা যাচাই এর সি প্রোগ্রাম
কাজ
- ভাউয়েল কিনা যাচাই এর কোড লিখ
- তুমার নাম লিখ ইনপুট নিয়ে
ucretsiz
Write what you want, when you want. No apologies needed. Lynn Allayne Fayola
bahis
Thank you ever so for you post. Really thank you! Keep writing. Aliza Riordan Lora
netflix
Hello. remarkable job. I did not anticipate this. This is a fantastic story. Thanks! Kailey Lewiss Tiphani
123movies
Really informative article post. Thanks Again. Keep writing. Zorine Gregor Deragon
bluray
You actually make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand. It seems too complicated and extremely broad for me. I am looking forward for your next post, I will try to get the hang of it!| Allx Shepard Mercer
yabanci
Hello. This post was really fascinating, particularly because I was looking for thoughts on this matter last couple of days. Bibi Andrew Borras
bncodeing
Thank you. Follow me
erotik
You made some really good points there. I checked on the net for more info about the issue and found most individuals will go along with your views on this website. Hedvige Arty Angy
bncodeing
follow Us.
erotik
I love reading a post that will make men and women think. Also, thanks for permitting me to comment! Lissi Toddie Hough
bncodeing
Thanks for your comment. follow bncodeing instruction.
turkce
Very nice article, exactly what I was looking for. Helsa Hobart Altaf
bncodeing
Thanks for your comment. follow bncodeing instruction.
erotik
Thank you being kind. Merry Christmas & Happy New Year! Ema Jayson Hayyim
bncodeing
Thanks. follow bncodeing guideline.
turkce
I?m impressed, I must claim. Really seldom do I run into a blog that?s both instructional and also enjoyable, as well as let me tell you, you have struck the nail on the head. Your concept is outstanding; the concern is something that inadequate people are speaking intelligently about. I am very happy that I stumbled across this in my look for something connecting to this. Aeriel Kilian Madian
bncodeing
Thanks for your comment. follow bncodeing instruction.
erotik
Hi there, just wanted to tell you, I loved this article. It was practical. Keep on posting!| Linnet Brucie Elisabet
bncodeing
Thanks For your great Comment. Follow bncodeing instruction.
CBD gummies for sale
What’s Going down i’m new to this, I stumbled upon this
I have found It absolutely useful and it has aided me
out loads. I am hoping to contribute & assist other users like its aided me.
Great job.
bncodeing
thanks follow us. bncodeing.com
bncodeing
ধন্যবাদ সবাই কে।
cbd oil for dogs
I blog quite often and I really thank you for your information. Your article
has really peaked my interest. I will bookmark your blog and keep checking for new information about once per week.
I subscribed to your RSS feed too.
bncodeing
Thanks for you positive comment. follow me.
CBD for dogs
Please let me know if you’re looking for a author for your blog.
You have some really good posts and I feel I would be a
good asset. If you ever want to take some of the
load off, I’d really like to write some content for your blog
in exchange for a link back to mine. Please send me an email if interested.
Regards!
my homepage: CBD for dogs
bncodeing
Thanks
best cbd gummies for pain
Excellent article. Keep writing such kind of info on your page.
Im really impressed by your blog.
Hey there, You’ve performed an excellent job. I’ll definitely digg it and in my opinion recommend to
my friends. I am confident they will be benefited from this website.
bncodeing
Thanks
cbd gummies for pain
I’ve been surfing online greater than three hours today, but I by no means
discovered any attention-grabbing article like yours.
It is beautiful value enough for me. In my opinion, if all site owners and
bloggers made good content material as you did, the internet shall be
much more useful than ever before.
bncodeing
thanks for your beautiful review. (bncodeing)
CBD gummies for sleep
It’s very trouble-free to find out any topic on web as compared to books, as
I found this paragraph at this website.
bncodeing
Follow us for Update.(bncodeing)
SHELL DOWNLOAD
Today, I went to the beach with my kids. I found a sea shell and gave it
to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the
shell to her ear and screamed. There was a hermit crab inside and it pinched her ear.
She never wants to go back! LoL I know this is totally off topic but I had to tell someone!
İnstagram takipçi satın al ucuz
Pretty nice post. I just stumbled upon your blog and
wanted to say that I’ve really enjoyed surfing around your blog posts.
In any case I’ll be subscribing to your rss feed and I hope you write again soon!
buy instagram followers
whoah this weblog is wonderful i really like reading your articles.
Stay up the great work! You recognize, a lot of persons are hunting around for this information,
you could aid them greatly.
antalya haşere ilaçlama
This text is priceless. How can I find out more?
buy instagram followers
I do consider all of the concepts you have presented on your
post. They’re really convincing and can certainly work.
Still, the posts are very short for beginners.
May just you please prolong them a bit from next time?
Thanks for the post.
Marklon
how to get valtrex over the counter viagra buying canada where to buy viagra over the counter in usa tadalafil 80mg online pharmacy no prescription
444takip.com
thanks you very good
444takip.com
thanks for post
bonus veren siteler
thanks you very good
papara bahis
thanks you very good
supreme clothing
I enjoy you because of every one of your work on this blog. Kate really loves going through research and it’s obvious why. We learn all of the lively way you provide good strategies on your website and in addition encourage participation from other people on this concern while our girl is certainly studying a lot. Take advantage of the rest of the year. You are always conducting a really great job.
Marklon
buy fildena
helloworld
Outstanding post however I was wondering if you could write a litte
more on this subject? I’d be very thankful if you could
elaborate a little bit more. Bless you!