top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

newline charact problem?

+2 votes
540 views

program is running in a for loop for some 800 values.when i printing ,some values only printing.if i put \n in printf at end then only i will get all loop values.but i dont want to do printf("\n"); at the end. what is the reason?pls explain.
i have some suggestion is there any memory type of issue.

posted Dec 19, 2014 by Sridharan P

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Can you share the code
Dint Understand The Question... Please Share The Code

Similar Questions
+2 votes

suppose we have an array of N natural numbers and asks him to solve the following queries:-
Query a:- modify the element present at index i to x.
Query b:- count the number of even numbers in range l to r inclusive.
Query c:- count the number of odd numbers in range l to r inclusive.

input:
First line of the input contains the number N. Next line contains N natural numbers.Next line contains an integer Q followed by Q queries.
a x y - modify the number at index x to y.
b x y - count the number of even numbers in range l to r inclusive.
c x y - count the number of odd numbers in range l to r inclusive.
I tried to solve using simple arrays but it isn't doing well for big constraints so I thought to use other DS with efficient algorithm so please explain appropriate algorithm.Thanks in advance.

...