473,394 Members | 1,794 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

questions about scanf

kirtikjr
plz tell me what does line means:

scanf ("%[^\n]s",char);

and some variants like: "%*s" and "%*s%s"
plz correct if any thing is wrong..
Nov 30 '08 #1
2 1349
weaknessforcats
9,208 Expert Mod 8TB
The first argument for scanf(), printf(),etc is a char string containing code characters that have meaning to the function. All of these codes are in any book on C.
Nov 30 '08 #2
newb16
687 512MB
@kirtikjr
The keyword for google is "[printf] format specifier".
First one afaik is "everything except \n" , what is %*s - I have no idea.
Nov 30 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: B Thomas | last post by:
Hi, I was reading O'Reilly's "Practical C programming" book and it warns against the use of scanf, suggesting to avoid using it completely . Instead it recomends to use using fgets and sscanf....
7
by: hugo27 | last post by:
obrhy8 June 18, 2004 Most compilers define EOF as -1. I'm just putting my toes in the water with a student's model named Miracle C. The ..h documentation of this compiler does state that when...
6
by: SithVegeta | last post by:
Code: #include <stdio.h> int main(void) { int in; printf("Please enter an ascii number to convert:\n"); scanf("%d \n", &in); printf("You entered %d, the regular value is %c", in, in);
1
by: danilo of TUP | last post by:
Greetings, im Danilo, a student from TUP Manila and taking up COMPUTER SCIENCE. we are going to have a defense or we could say a project in turbo c. i just wanna know how to use the SWITCH...
8
by: Gregc. | last post by:
Hi Sorry to bother you gusy with such a basic question, but I am working on a conversion program. I've got most of it down, but I am having trouble with the output: *Dollar Conversion...
14
by: main() | last post by:
I know this is the problem that most newbies get into. #include<stdio.h> int main(void) { char a; scanf("%c",&a); /*1st scanf */ printf("%c\n",a); scanf("%c",&a); /*2nd scanf*/...
15
by: Eoghan | last post by:
Hi there! I have two simple questions about a program i'm doing: 1) if I write: enum logic {VERO=1, FALSO=0}; logic trovato=VERO; Is this correct according to the ANSI '89 standard? 2) I...
4
by: Niall 84 | last post by:
Hi all, Haven't done C or C++ in a few years and have never done a huge amount of it. I'm trying to do some very basic programmes at the moment to get back into it. 1st of all I'm using...
0
by: Andrey Tarasevich | last post by:
Nomen Nescio wrote: This sequence point is there to allow you to use code like double d; scanf("%lf %lf", &d, &d); without worrying about the inner workings of 'scanf' violating the...
4
by: shaieen | last post by:
#include<stdio.h> #include<conio.h> #include<string.h> main(){ typedef struct info { char fname(void),mname(void),famname(void); int age,cont; char adr; }...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.