adspace


How can I remove the leading spaces from a string?

Answer Posted / Ravi Ranjan

To remove leading spaces from a string, you can use the sscanf function in C. Here's an example:nnchar str[100]; // your stringnsscanf(str, "%[^t ]"%, str); // removes leading whitespaces

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

1181


write a progrmm in c language take user interface generate table using for loop?

2123


develop algorithms to add polynomials (i) in one variable

2258


What is pointers in c with example?

1167


What are pointers? What are different types of pointers?

1264


Do you know the difference between malloc() and calloc() function?

1133


What is pointer to pointer in c with example?

1198


In C programming, how do you insert quote characters (‘ and “) into the output screen?

1616


What is the difference between union and anonymous union?

1397


What are compound statements?

1289


What is variable initialization and why is it important?

1391


write a program to find out prime number using sieve case?

2175


How can I implement sets or arrays of bits?

1118


Differentiate between null and void pointers.

1258


what is ur strangth & weekness

2590