scanf Basics | C Programming Tutorial

preview_player
Показать описание
An overview of how to use scanf in C to accept input from the user!

Рекомендации по теме
Комментарии
Автор

My God this was so exceptional and clear. Easy to understand as well. Thank you Sir

emmanuelenemali
Автор

Great i needed this 4 th day of csit
So exicted

gorkhalipahadi
Автор

Great video!! Cannot find next video "How to store string with spaces"

NikitaSafronov-yi
Автор

as before, great video :)
I was wondering, when you changed "n" from double to char couldn't you keep the %d, because char is just an 8Bit number and so even smaller than double.

depsylon
Автор

I have a question. How do you prevent the user from input the wrong type data. Like I use scanf("%d") but the user type the string and it's ruined my program.

BobChess
Автор

I had a question about integer and char

int k = 0;
printf ("Enter a number: ");
scanf ("%d", &k);
printf("k: %d\n", k);

char b = 'a';
printf ("Enter a char: ");
scanf ("%c", &b);
printf("b: %c\n", b);

When I do this It does not let me input the value of char in the compiler. I get the following result after building and running it.

Enter a number: 6
k: 6
Enter a char: b:

I just wanted to know if i can use char after int or not.

rezuwankabir
Автор

I keep getting an error that says "Return value ignored: 'scanf'. and when I printf my variable it shows as a huge negative number

NurettinSafak
Автор

whatever I do or did or anything or before or after

ryanalnaser
Автор

I have a question, why don’t we use the get_int or get_string function. Wouldn’t Scanf make it more complicated?

yalol
Автор

why do you have to write the n=0 and not leave it as n; ?

generation
Автор

bro tk u so much for the content <3

vimwizard
Автор

how do you run c programs with scanf on your mac? mine doesnt work :(( send help

vandabiss
Автор

is this still usable? or is it not up to date?

LukeEdward-pv
Автор

i have to put this macro at the top of my .c file
#define _CRT_SECURE_NO_WARNINGS
any reasons why, and tips on how to get rid of it ?

IsaacCode