Python – C – 013: Please convert the following Python code to C so that the C program executes successfully passing the test cases.
N = int(input())
for ctr in range(N):
currRow = list(map(int, input().strip().split()))
print(len(currRow), sum(currRow))
#include<stdio.h>
#include<stdlib.h>
int main()
{
int n,i;
scanf("%dn",&n);
for(i=1;i<=n;i++)
{
int l=0,s=0,num;
char ch;
while(1)
{
scanf("%d%c",&num,&ch);
s=s+num;
l++;
if(ch=='n' || ch=='r')
break;
}
printf("%d %dn",l,s);
}
}