🚀 Loved the tutorial? Take it further with Programiz PRO! Refine your skills, conquer coding fears, and build confidence with interactive lessons, quizzes, and challenges. Strengthen your programming foundation and master C today! 👉Start Here: bit.ly/c-master
I am currently doing lab assignments in a course about C programming, and these videos are really great "lectures"; I actually enjoy them a lot more than my official lectures for the course, haha.
Wonderful intro to strings in C, for the quiz because its using scanf and not fgets it will only have C. "Jack " and this is the code practice #include int main() { // Write C code here char str[20];
printf("Enter your name: ");
fgets(str, sizeof(str), stdin);//this will get the entier input with spaces str[0] = 'X';
I appreciate this channel. My college teachers don't teach programming and they send us to teach ourselves with reading text books and marking our tests and workshops.
If there's an ad runnning on the video, let them run the entire ads, just let it feels like you are watching on TV, and there are ads on it, through these we can help them, after all, we learn from these guys, for free....
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
@@pravyjha4567 scanf only accepts the characters before a blank space. So in "Jack sparrow", the characters "Jack" is before the space. So scanf takes jack and displays it as the output. Hope this helps!
Q. What will be the value of the name variable if we provide Jack Sparrow as input value? char name[20]; scanf("%s", &name); A. Jack Sparrow B. Sparrow C. Jack D. Error
#include int main() { char str[30]; printf("enter your name"); fgets(str, sizeof(str), stdin);// replaces scanf, its role its to take input till the end of line str[0] = 'X'; printf("%s ", str);//accessing the i in naomi using string index printf("%c ",str[4]); return 0;//fgets function str- name of string.sizeof the strinf, second parameter, stdin means standard input typed in from keyboard }
This series of video helps me to understand C language more and the content was very explainable and entertaining. Thank you so much Programiz! #HighlyRecommend
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Consider P(x)=anxn+...........+a1x1+a0 Write a program that gets from the keyboard coefficients values an,..........,a0 and stores them in a table of floating type of dimension 5 . The integer n and the real x are also introduced from the keyboard Calculate P(x). I need an answer as soon as possible.
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Consider P(x)=anxn+...........+a1x1+a0 Write a program that gets from the keyboard coefficients values an,..........,a0 and stores them in a table of floating type of dimension 5 . The integer n and the real x are also introduced from the keyboard Calculate P(x). I need an answer as soon as possible.
#include int main(){ int n, i; float P, a, x, xn; printf("Input n: "); scanf("%d", &n); printf("Input x: "); scanf("%f", &x); P=0.0; xn=1.0; for(i=0; i
You can also use this: #include // Include the standard(std) input(i) output(o) library header file for your program #define _v(var) a##var /* a C macro which which can be used to give names to our coefficients from a0 to an, we won't be using it now as it is not needed and could be ignored Search online to learn about C macros (preprocessors) */ //Main function start below which will run when we run the code int main(){ // integer n will store the value of input n, and i will be used for loop int n, i;
/* P will store the sum a0x0 + a1x1 + ... + anxn x will store the value of input x */ float P, x, xn; printf("Input n: "); scanf("%d", &n); printf("Input x: "); scanf("%f", &x); float a[n]; // we take an array of size n which will store our coefficients a0 to an, this is not needed but we will use it. P=0.0; xn=1.0; for(i=0; i
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Thank you very much for your helpful videos, I’m currently taking C programming and your videos are the best tools for me to study. Also, who doesn’t like to watch a beautiful woman teaching C, you are absolutely gorgeous!
/* Create a program that takes your fullname as input and prints your name.Then, change the first letter of your name to X. * If your name is John Williams, it will become Xohn Williams. * If your name is Julie Bing, it will become Xulie Bing. */ #include int main(){ char name[100]; printf("Enter your name: "); fgets(name, sizeof name, stdin); printf(" "); printf("%s ", name); name[0] = 'X'; printf("%s ", name); return 0; }
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
//C program to print Name and replace first character with X #include int main() { // Write C code here char str[30]; printf("Name: "); fgets(str, sizeof(str), stdin); printf ("%s", str); str[0] = 'X'; printf(" %s", str); return 0 ; }
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Uiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
char name[20]; // declaring the array of characters // Displaying the name to enter printf(" Enter your name :
"); // Storing the name to enter in the address of the array fgets(name, sizeof(name), stdin ); name[0] = 'X'; // We want to replace the value of the first letter in the name by X ( index 0 ) // we want to display the characters (name) with the first letter replaced by X printf("%s
I have a doubt, can i decide the size of array like she used it in here as char str [20]; is there any problem in changing the size to 30 or 40, plz anyone reply😢
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Uiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
No dude the output will not lead to an error . Just as you mentioned in the last case for str it worked because it was the name of the string and here the name of the string is name and hence both actually are doing the same thing but with a different face
#include int main (){ char str[20]; printf("Enter your Name:"); scanf("%s", str); str[0] = 'X'; // it allows us to create the first name is 'X' . printf("%s", str); return 0; }
#include int main () { char name [36]; printf("enter your full name: "); fgets (name, sizeof(name), stdin); name [0] = 'X'; printf("%s", name); return 0; }
/*Create a program that takes your full name as input and prints your name.Then, change the first letter of your name to X. • If your name is John Williams, it will become Xohn Williams. • If your name is Julie Bing, it will become Xulie Bing.*/ printf("-- Programming Task -- "); printf("Enter name: "); char taskName[20]; fgets(taskName, sizeof(taskName), stdin); int timer = 0; taskName[0] = 'X'; while (taskName[timer] != NULL) { if (taskName[timer] != ' ') printf("%c", taskName[timer]); else { printf("%c", taskName[timer]); taskName[timer + 1] = toupper(taskName[timer + 1]); } timer++; } // Answer is A, printed whole chars
🚀 Loved the tutorial? Take it further with Programiz PRO!
Refine your skills, conquer coding fears, and build confidence with interactive lessons, quizzes, and challenges. Strengthen your programming foundation and master C today!
👉Start Here: bit.ly/c-master
#include
int main() {
char str[50];
printf("enter your name :");
fgets(str,sizeof(str),stdin);
str[0]='X';
printf(" new name :%s",str);
return 0;
}
Currently studying for tmr's programming test. I had a hard time trying to understand C programming until I found this channel. Thank you!
I am currently doing lab assignments in a course about C programming, and these videos are really great "lectures";
I actually enjoy them a lot more than my official lectures for the course, haha.
Wonderful intro to strings in C, for the quiz because its using scanf and not fgets it will only have C. "Jack "
and this is the code practice
#include
int main() {
// Write C code here
char str[20];
printf("Enter your name: ");
fgets(str, sizeof(str), stdin);//this will get the entier input with spaces
str[0] = 'X';
printf("%s",str);
return 0;
}
last week i went for an interview in a core company and they told me to learn C programming so this channel helps me a lot.
I appreciate this channel. My college teachers don't teach programming and they send us to teach ourselves with reading text books and marking our tests and workshops.
That’s because you’re in community college.
If there's an ad runnning on the video, let them run the entire ads, just let it feels like you are watching on TV, and there are ads on it, through these we can help them, after all, we learn from these guys, for free....
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Answer wil be "jack"
Be aware to use ' ' instead of " " !!
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
@@pravyjha4567 scanf only accepts the characters before a blank space. So in "Jack sparrow", the characters "Jack" is before the space. So scanf takes jack and displays it as the output. Hope this helps!
Love your videos! Helps me a lot.
Q. What will be the value of the name variable if we provide Jack Sparrow as input value?
char name[20];
scanf("%s", &name);
A. Jack Sparrow
B. Sparrow
C. Jack
D. Error
Error
@@josephelson it's an error dude,name is already a pointer , or refence to 20 char, we dont need to pass name's reference(&name) for user input.
Error
D . Error
Error
#include
int main() {
char str[30];
printf("enter your name");
fgets(str, sizeof(str), stdin);// replaces scanf, its role its to take input till the end of line
str[0] = 'X';
printf("%s ", str);//accessing the i in naomi using string index
printf("%c ",str[4]);
return 0;//fgets function str- name of string.sizeof the strinf, second parameter, stdin means standard input typed in from keyboard
}
Thanks a lot 🥺🥺🥺
Very good explanation...keep doing it. Thank you Programiz.
This series of video helps me to understand C language more and the content was very explainable and entertaining. Thank you so much Programiz! #HighlyRecommend
Timestamps:
00:00 Start
00:16 C Strings
02:45 String Input
05:58 Access Characters of a String
07:49 Change Characters of String
9:12 Programming Task
9:54 Quiz
ans for that is Error pls reply;
option c. jack
Option c
Ohhhhh
What a content
Good place in good time
Option C : Jack
-------------------------------------------------------------------------------
#include
int main()
{
char str[25];
printf("Enter Your Name : ");
fgets(str, sizeof(str), stdin);
printf("%s", str);
str[0] = 'X';
printf("%s", str);
return 0;
}
SO HELPFUL CONENT
Thanks Alot Sister❤️
amazing teacher😍
Thank you, you are a hero!
Omg thank youu 😍
Amazing 😍😍😍
Great video!!
Mam adding two matrix program explainations
option D
because of the ampersand?
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
so helpfu, thank you very much!
💗thank you so much .....
Thanks a lot
THANK YOUµ
NICE CONTENT ♥️👌
Thank you
Programming Task :
#include
int main(){
char name[20]="Tushar Mahajan";
printf("enter your name:");
fgets(name, sizeof(name), stdin);
printf("%s",name);
name[0]= 'X';
printf("%s",name);
return 0;
}
Hello, I need your help with a question.
Consider P(x)=anxn+...........+a1x1+a0
Write a program that gets from the keyboard coefficients values an,..........,a0 and stores them in a table of floating type of dimension 5 .
The integer n and the real x are also introduced from the keyboard
Calculate P(x).
I need an answer as soon as possible.
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Consider
P(x)=anxn+...........+a1x1+a0
Write a program that gets from the keyboard coefficients values an,..........,a0 and stores them in a table of floating type of dimension 5 .
The integer n and the real x are also introduced from the keyboard
Calculate P(x).
I need an answer as soon as possible.
Do you have time left?
#include
int main(){
int n, i;
float P, a, x, xn;
printf("Input n: ");
scanf("%d", &n);
printf("Input x: ");
scanf("%f", &x);
P=0.0;
xn=1.0;
for(i=0; i
You can also use this:
#include // Include the standard(std) input(i) output(o) library header file for your program
#define _v(var) a##var
/* a C macro which which can be used to give names to our coefficients from a0 to an, we won't be using it now as it is not needed and could be ignored
Search online to learn about C macros (preprocessors)
*/
//Main function start below which will run when we run the code
int main(){
// integer n will store the value of input n, and i will be used for loop
int n, i;
/* P will store the sum a0x0 + a1x1 + ... + anxn
x will store the value of input x
*/
float P, x, xn;
printf("Input n: ");
scanf("%d", &n);
printf("Input x: ");
scanf("%f", &x);
float a[n]; // we take an array of size n which will store our coefficients a0 to an, this is not needed but we will use it.
P=0.0;
xn=1.0;
for(i=0; i
Great veido...
Thanks Madam...
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Thanks, answer will be C. Jack
Thank you very much for your helpful videos, I’m currently taking C programming and your videos are the best tools for me to study. Also, who doesn’t like to watch a beautiful woman teaching C, you are absolutely gorgeous!
thanks!
D. Error
Love it!
Support!!!!
(jack)output as the user provided space in between user input
/*
Create a program that takes your fullname as
input and prints your name.Then, change the
first letter of your name to X.
* If your name is John Williams, it will become
Xohn Williams.
* If your name is Julie Bing, it will become Xulie
Bing.
*/
#include
int main(){
char name[100];
printf("Enter your name: ");
fgets(name, sizeof name, stdin);
printf("
");
printf("%s
", name);
name[0] = 'X';
printf("%s
", name);
return 0;
}
good
Content is explained very clearly! The video was really useful 🥰
nice
#include
int main()
{
char str [] = "Piash";
str [0]= 'X';
printf("%s",str);
return 0;
}
quiz answer:
C. Jack
(P.S. You can check and confirm using the compiler)
More video
Why we are int main in function
Mam yaha pr "string" jo hai vo " constant" ka part hai to token ka part kaise ho sakta or ye koi dusara string hai. Please explain me 🤔🤔🤔
lub u 😘😘😘😘😘😚😍😍🥰🥰💋💋💗💗
Answer : C (Jack)
Hi
How put Char in string .
Such as
{'A','B','C'} ; to string "ABC";
And how remove or delet one letter.
ur complier is some wht different from another c compliers!!!#include
int main(){
char name[100];
scanf("%s", &name);
printf("%s",name);
return 0;
}
it taking & in strings !!!
👏👏👏
all your videos have been great so far, however you haven't explained what is fgets()
❤❤❤
Why is it blurr???
Option C. JACK
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
The answer is Jack
#include
int main(){
char name[20];
printf("Enter Name: ");
scanf("%s", &name);
printf("%s", name);
return 0;
}
The output is Jack
C is the answer
and you type in return "CHEEERIO" LMAOOO 🤣🤣🤣🤣
//C program to print Name and replace first character with X
#include
int main() {
// Write C code here
char str[30];
printf("Name: ");
fgets(str, sizeof(str), stdin);
printf ("%s", str);
str[0] = 'X';
printf("
%s", str);
return 0 ;
}
Let me saw you jero jero
task:
#include
int main() {
char string[20];
printf("Enter your name:
");
fgets(string, sizeof (string), stdin);
string[0] = 'X';
printf("%s", string);
return 0;
}
I assume, it would be an error as there is no printf function there...
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Quiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Uiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
have you test it for yourself?
what is the difference?
int main(void)
{
char name[20]; // declaring the array of characters
// Displaying the name to enter
printf(" Enter your name :
");
// Storing the name to enter in the address of the array
fgets(name, sizeof(name), stdin );
name[0] = 'X'; // We want to replace the value of the first letter in the name by X ( index 0 )
// we want to display the characters (name) with the first letter replaced by X
printf("%s
", name);
return EXIT_SUCCESS;
}
Error is the correct answer for this last question
I have a doubt, can i decide the size of array like she used it in here as char str [20]; is there any problem in changing the size to 30 or 40, plz anyone reply😢
no its no problem in changing the size
Can somebody pls tell me that while printing string we dont use ampersand so how come in the Uiz que she uses ampersand in the printf statement and the answer is Jack????? Pls
Error
error bcoz in scanf & is given to str
No dude the output will not lead to an error . Just as you mentioned in the last case for str it worked because it was the name of the string and here the name of the string is name and hence both actually are doing the same thing but with a different face
Return "CHEERRIO" 😂😂😂
" Your smile😀 is so, Beautiful, so keep smiling always 😁😋"
6:26 its zero not gero
ans C : jack
opt c , jack
D error.
JACK
Answer is jack
error?
John
answer is C, Jack
#include
int main (){
char str[20];
printf("Enter your Name:");
scanf("%s", str);
str[0] = 'X'; // it allows us to create the first name is 'X' .
printf("%s", str);
return 0;
}
Answer b
Please provide videos for c++ programming
Only Jack is printed
i think u gtot some knowledge that
must be shared
Programing task:
#include
int main() {
char ita [50];
printf("what is my name: ");
fgets(ita, sizeof(ita), stdin);
ita[0] = 'x';
printf("%s", ita);
return 0;
}
4. Error
Quiz answer is c
#include
int main () {
char name [36];
printf("enter your full name: ");
fgets (name, sizeof(name), stdin);
name [0] = 'X';
printf("%s", name);
return 0;
}
/*Create a program that takes your full name as
input and prints your name.Then, change the
first letter of your name to X.
• If your name is John Williams, it will become
Xohn Williams.
• If your name is Julie Bing, it will become Xulie
Bing.*/
printf("-- Programming Task --
");
printf("Enter name: ");
char taskName[20];
fgets(taskName, sizeof(taskName), stdin);
int timer = 0;
taskName[0] = 'X';
while (taskName[timer] != NULL)
{
if (taskName[timer] != ' ')
printf("%c", taskName[timer]);
else {
printf("%c", taskName[timer]);
taskName[timer + 1] = toupper(taskName[timer + 1]);
}
timer++;
}
// Answer is A, printed whole chars
void main()
{
char name[24];
printf("Enter your full name:");
fgets(name,sizeof(name),stdin);
printf("%s
",name);
name[0]='X';
printf("%s",name);
}
Quiz = C
Quiz Answer is Jack
answer of last question is error
c.jack