0

Title for scanf box / C language

Like we have prompt in javascript where we can define title for prompt box ex- var a = prompt("your age"); In C we write var age; scanf("%d", &age) In scan box it says "write multiple input in separate lines" If i want to show there something like input your age , how can i do it.

5th Dec 2021, 3:38 AM
Divya Mohan
Divya Mohan - avatar
7 Answers
+ 3
If you mean to change the prompt in the Code Playground input dialog, then I'm afraid that's a big no : )
5th Dec 2021, 3:42 AM
Ipang
+ 3
Are you doing this in Code Playground or in your device? If you're doing this C coding in your device, then there shouldn't be any input dialog, you'd be providing inputs and viewing outputs on the console screen. I just noticed you tagged "js" up there. So this question is about C or JS? I'm a bit confused ...
5th Dec 2021, 3:50 AM
Ipang
+ 2
Oh okay ... well, as I see it, we can't customize the input dialog prompt for non-web codes (including C codes). So it's not possible unfortunately ...
5th Dec 2021, 3:55 AM
Ipang
+ 1
I have read that scanf and printf are predefined in stdio.h file. can't we access them in our page to manupulate those def ?
5th Dec 2021, 3:46 AM
Divya Mohan
Divya Mohan - avatar
+ 1
I have just shifted to c from js so expecting some better features of js here
5th Dec 2021, 3:49 AM
Divya Mohan
Divya Mohan - avatar
+ 1
I am asking that how can i do it in C as we were doing in js. Js was just for example here. I m learning c.
5th Dec 2021, 3:53 AM
Divya Mohan
Divya Mohan - avatar
+ 1
Im coding in sololearn playground
5th Dec 2021, 3:53 AM
Divya Mohan
Divya Mohan - avatar