Talula
#include <stdio.h> int main() { char name[20]; char name2[20]; printf("enter the name"); scanf("%s",&name); printf("enter the 2nd name"); scanf("%s",&name2); printf ("the array 1 is %s\n\r",name); printf("the array 2 is %s\n\r",name2); }
Vinay
is this executing now?
Talula
Yes...
Vinay
also u took %s instead of %[^\n]
Tangent Alpha
can someone resolve the error in my prog
put the code in a main function
Talula
also u took %s instead of %[^\n]
I really don't know what is %[^\n]
Talula
Maybe till new line or something?
Vinay
ok thanks %s is fine
ברני
ok thanks %s is fine
Because you did a string, you need to use %s, if it wasn't a string you would use %c, On chars
olli
Maybe till new line or something?
correct, there would be a difference if the string contains a whitespace character
Anonymous
Hello guys, I'm a beginner of programming language. Recently I'm focusing C++, I just started. I need your help guys.
Anonymous
Okay.
Thank you brother
Anonymous
#cppbookguide
Okay, I will check that out
Anonymous
Thank you sister
Talula
Thank you brother
Oh, sister is your brother and bot is your sister?
Anonymous
Lol
Her name is Rose... 🙈
Dima
Lmao
Dima
LOL
Dima
It’s always so funny
ברני
It is a bot.
It will be funny if Ross will answer "you're a bot!"
Anonymous
Sorry guys, this is my first time using this app... 🤦‍♂
Xudoyberdi
Her name is Rose... 🙈
Happy staying in good relationship with sis, then.
Talula
It will be funny if Ross will answer "you're a bot!"
Good thing it doesn't kick me for calling it a bot.
Xudoyberdi
Just for this time brother
I meant no offence, just chill.
Anonymous
Hi here! If you are a developer or you know more about VPN vocabulary, and would like you to help me to translate my app from English to Chinese. Inbox me I'll send the .json file to you. Thanks
Anonymous
Guys is there any tool to check for memory leaks in the command line
Sid Sun
Heyy, I'm looking for a C++ unit testing framework, do you have any recommendations or perhaps a resource I can look at?
Vinay
Vinay
cant able to resolve this error
Vinay
kindly someone help
Mandelbröt
Any approach how to check a substring of a same string is a subsequence on the same string?
Dima
what
Sid Sun
what
Heyy Dima, long time no see; how've you been?
Truth
what
I just started learning c++ and I need a team it would be great to learn together
Mandelbröt
what
Any approach how to check a substring of a string is a subsequence on the same string?
Anonymous
Windows or Linux?
Linux of course
Mandelbröt
😅
Anonymous
valgrind
it is slow and the info it's gives isn't that great
Sid Sun
google test
I was refraining from it cuz its a Google project, they have a history of deprecation - is this the standard framework?
Sid Sun
what do you mean standard? there are no test frameworks in c or c++ standard
yeah - l mean like, is it what people generally use?
Alex
yes
Alex
not everyone of course, there are other options
Sid Sun
not everyone of course, there are other options
yeah, Boost, Microsoft and Google seem to be popular ones
Sid Sun
Thanks though :)
Anonymous
Catch2 or Doctest is a good option
Ludovic 'Archivist'
Catch2 or Doctest is a good option
I've used catch2 in the past with satisfactory results
Vinay
guys help me in this
ברני
guys help me in this
#include <stdio.h> int main() { // Write C code here int a[5]={5,8,65,45,34}; int i; for (i=0;i<5;i++) printf("%d ",a[i]); }
ברני
You need to put Somthing in the array.
Vinay
ohh i see
Vinay
thanks u
Roshan
There is no initialisation for the array a
Henry
Hi anyone know about doublelinkedlist
Vinay
Roshan
No initialise it
Roshan
You can get the values from user or set it in your code...
Q
should i use another name??
int a[5]; will create an array but it will contain garbage values which is of no use so you should either initialise it like int a[5] = { 1,2 ,3,4,5}; Or you can take inputs from user
Vinay
ok... therefore i was getting strange random value everytime i execute it
Vlad
Must be getting 0s or random...
Stack values are not zero initialized
Vinay
Must be getting 0s or random...
random values with zeroes too
Roshan
Yes
Vinay
what is the reason behind it btw
Vinay
why i was getting random values