Strings - Hindi
- subtitles off
- captions off
- English
- Hindi
- Questions posted on Forums
- C and Cpp Tutorials - Hindi
-
Strings
#include<stdio.h>#include<string.h>int main(){ char varname[]={'p','r','o','g','r','a','m'}; printf("The string is %s\n", varname); return 0;}Naveen VP
04-05M 10-20S naveenpalanisamy142002@gmail.com
Answer last updated on: Aug. 19, 2024, 4:03 p.m.
-
string palindrome
#include <iostream>#include<iomanip>#include<string.h>using namespace std;int main(){ char s1[20],s2[20]; cout<<"Enter a string:\n"; cin>>setw(19)>>s1; srtcpy(s2,s1); strrev(s2); if((strcmp(s1,s2))==0) cout<<"string is palindrome\n"; else cout<<"string is not a palindrome\n"; return 0;}showing an error here srtcpy(s2,s1); strrev(s2);
02-03M 20-30S Krishnasain
Answer last updated on: July 24, 2023, 10:44 a.m.
-
Regarding String Variable
In the program, I couldn't understand the usage of 'string variable' instead of 'char'. Kindly please explain.
07-08M 50-60S srishtipramanic7@gmail.com
Answer last updated on: Sept. 15, 2021, 1:37 p.m.
-
not reading the string value..
#include<stdio.h>//#include<string.h>void main(){ int n; char str[20]; //={"am string"}; printf("Enter a number"); scanf("%d",&n); printf("Enter a String"); scanf("%[^\\n]s",str); printf("The Number You entered is: %d\\n",n); printf("The String You entered is: %s\\n",str);}
04-05M 0-10S SudheerSharma
Answer last updated on: June 21, 2021, 5:41 p.m.
-
Usage of 'getline'
What is the syntax and how to use the keyword 'getline'. Please explain elaborately (this single-use is confusing). I couldn't find a proper explanation on the internet.Links to a good explanation are also appreciated.
08-09M 20-30S bsscharan
Answer last updated on: Oct. 31, 2020, 1:52 p.m.
-
Regarding syntax of 'scanf' function.
In the program, we write, scanf("%[^\n]s", string_name).I tried missing the [^\n] part, but the result is virtually the same. Please explain, what exactly is its use in spacing?
02-03M 0-10S bsscharan
Answer last updated on: Oct. 25, 2020, 12:04 a.m.
-
String Input
#include<stdio.h>void main(){\tchar a;\tchar s[10],s1[10];\tprintf("Enter String: ");\tscanf("%[^\\n]s",s1);\tprintf("Enter string2: ");\tscanf("%[^\\n]s",s);\tprintf("String1: %s\\n",s1);\tprintf("String2: %s",s);\t}Output:Enter String: HimaniEnter string2: String1: HimaniString2: @I am not able to read values in second string.
05-06M 10-20S Himani.Parekh
Answer last updated on: Feb. 29, 2020, 4:27 p.m.
-
Unexpected Output
#include<stdio.h>#include<string.h>int main(){\t char strname[30]="Spoken-Tutorial";\tchar s[]={'a','b','c'}; printf("The string is %s\\n", strname);\tprintf("String: %s\\n",s); return 0;}For the above code output is following:The string is Spoken-TutorialString: abcSpoken-TutorialWhy string s is containing such value?
02-03M 10-20S Himani.Parekh
Answer last updated on: Feb. 29, 2020, 4:20 p.m.
-
Getline
can we use cin.get() instead of getline
08-09M 10-20S pradipghorpade
Answer last updated on: Feb. 29, 2020, 4:19 p.m.
-
Strings
How can I remove the trailing spaces from a string?
08-09M 40-50S profmuniasamy
Answer last updated on: Feb. 29, 2020, 2:58 p.m.
-
getc() and getchar()
clarify the difference between getch() and getc()
00-01M 0-10S lavanya.kk2005@gmail.com
Answer last updated on: Feb. 29, 2020, 12:30 p.m.
-
1First C Program
-
2First Cpp Program
-
3Tokens
-
4Functions
-
5Scope Of Variables
-
6If And Else If statement
-
7Nested If And Switch Statement
-
8Increment And Decrement Operators
-
9Arithmetic Operators
-
10Relational Operators
-
11Logical Operators
-
12Loops
-
13Arrays
-
14Working With 2D Arrays
-
Strings
-
16String Library Functions
-
17Working With Structures
-
18Understanding Pointers
-
19Function Call
-
20File Handling In C
Questions posted on ST Forums:
2868 visits
Outline:
स्ट्रिंग्स -स्ट्रिंग क्या है। -स्ट्रिंग डिक्लेयर करने के लिए सिॆटैक्स -स्ट्रिंग इनीशिलाइज करने के लिए सिॆटैक्स -कीबोर्ड से स्ट्रिंग रीड करना
Width: | 864 | Height: | 704 |
---|---|---|---|
Duration: | 00:11:21 | Size: | 7.2 MB |
Show video info