How can I remove the leading spaces from a string?



How can I remove the leading spaces from a string?..

Answer / 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

More C Interview Questions

What is the right type to use for boolean values in c?

1 Answers  


1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

1 Answers  


write a c program to find largest number in matrix(in each row,each column, diagonally, and in the whole matrix)? Its urgent.

2 Answers  


WHAT IS HIGH LEVEL LANGUAGE?

2 Answers  


What does int main () mean?

1 Answers  


What is d'n in c?

1 Answers  


which do you prefer C or Pascal?

1 Answers  


why program counter is 16 bit?

3 Answers  


What is extern c used for?

1 Answers  


Convert the following expression to postfix and prefix X $ Y Z - M + N + P / Q / (R + S)

2 Answers  


what does " calloc" do?

7 Answers   Cadence, Logos,


Define C in your own Language.

1 Answers   Motorola,


Categories