Can we scan multi-character word using scanf?

How to scan multi-character word using scanf? I don't want to use strings.

Replies

  • Pensu
    Pensu
    I didnt get your question completely, but if you want to scan a word using scanf then you can use a loop like:

    for(i=0;i
                                        
  • HirenBarbhaya
    HirenBarbhaya
    you can use scanf with '%s' option.. it would read the string (no white space)
  • gaurav.bhorkar
    gaurav.bhorkar
    vipandeep
    I dont wanna go in strings
    A multi-character word will always be a string.

You are reading an archived discussion.

Related Posts

check this codes guy's... import java.io.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; /**/ public class p extends JApplet implements ActionListener { JLabel l1,l2; JButton b; JTextField f1,f2;...
You are given 9,9,9,9,5,5,5,5,3,3,3,3,1,1,1,1.Now you are supposed to select exactly 6 no.s from the given no.s so that the sum is exactly 21. It's a challenge. If you are a...
The wordpress 3.0.3 update has been released on WordPress.org and it fixes a security issue related to sites with remote publishing enabled. Remote publishing is disabled by default, but you...
Emblazon′10 is the National Level Student Technical fest organized by the Department of Electronics and Communication Engineering of JNTUH College of Engineering, Nachupally(Kondagattu), Karimnagar Dt. (JNTUHCEJ). This symposium mainly aims...
PIXEL- 2K10- A National Level Technical Symposium for Students of B. Tech, M. Tech & M.C.A to be held on December 15th & 16th, 2010. The Symposium serves as a...