Question
How can i pad a string to a known length?

Answers

printf("%-20.20s", data[d]);The "%-20.20s" argument tells the printf() function that you are printing a string and you want to force it to be 20 characters long. By default, the string is right justified, but by including the minus sign (-) before the first 20, you tell the printf() function to left-justify your string. This action forces the printf() function to pad the string with spaces to make it 20 characters long.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q Honi soit qui mal y pence is the motto of what organisation
  • Q In which following not release digestive enzyme–
  • Q Pratibha Ray won Jnanpith Award for work in which language?
  • Q Make up corrections, put true or false for highlight/shade
  • Q What is flow field & sum index field?
  • Q What is the second highest (pitch) note on a conventionally tuned violin or mandolin?
  • Q What are natural active immunization and artificial active immunization?
  • Q Explain the functional anatomy of female reproductive system and hormonal control.
  • Q Define the terms: excursionist, front of the house, high-touch service
  • Q Ten 1000 virgins bought insurance against what in 2000
  • Q Tell me about your family. How do they feel about your decision to attend medical school?