**TCS Coding Questions**

**Leap Year Question | TCS NQT 2019 - Slot 2 [16 June 2019]**

**The program will recieve 3 English words inputs from STDIN**

**Ques with series 0,0,2,1,4,2,6,3,8,4,10,5,12,6,14,7,16,8**

**Ques with series**

**1, 2, 1, 3, 2, 5, 3, 7, 5, 11, 8, 13, 13, 17**

**[ Youtube ]**

**Square root of prime number [ Youtube ]**

**Prime Sum within given range [ Youtube ]**

**Check whether a given String is Palindrome or not**

**Check whether a year is leap or not**

**Decimal to Binary**

**Binary to Decimal**

**Binary to Octal**

**Sum of Prime Number**

**Area of circle**

**Sum of digits of Number**

**Find upto nth Fibonacci sequence**

**Sum of Odd Number Between Range using scanf()**

**[ Youtube ]**

**To Reverse a String / Integer**

**To find largest among N numbers**

**C Program to convert Vowel into uppercas of a Word**

**C program to remove consonants from a String**

More Experience will be Shared soon...!!!

If you like

**SimpleWay2Code**and would like to contribute, you can also write an article and mail your article to

**simpleway2code@outlook.com**. See your article appearing on the

**SimpleWay2Code**main page and help others.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

## 4 Comments

Consider the below series:

ReplyDelete1, 2, 1, 3, 2, 5, 3, 7, 5, 11, 8, 13, 13, 17, …

This series is a mixture of 2 series – all the odd terms in this series form a Fibonacci series and all the even terms are the prime numbers in ascending order.

Write a program to find the Nth term in this series.

this is your program bro an thank you for question

Delete#include

#include

int main()

{

int j,k,prime=1,i=2,m=1,x=1,y=1,o,fib,n,output;

scanf("%d",&n);

for(o=0;o2){

fib=x+y;

output=i;

x=y;

y=fib;

}

m++;

}

}

printf("%d",output);

return (0);

}

Please give me solution

ReplyDeletejust click the link

Deletehttps://www.dropbox.com/s/7vzanhntmfrak22/series.c?dl=0