(Most Asked) TCS NQT Coding Questions with Answers (TCS NQT 2020)

The most asked type TCS NQT Coding Questions asked in TCS NQT 2020 Exam the whole solution is provided for TCS NQT 2020 Coding Questions with Answers.
TCS NQT Preparation Course - bit.ly/prime-tcs-nqt-course
Use Coupon Code "KZread" to get maximum discount.
Check Solutions and more code on - prepinsta.com/tcs-coding-ques...
Imp: Join Whatsapp Notification Group : prepinsta.com/whatsapp/
Join Telegram Notification channel : prepinsta.com/telegram/
TCS All Coding Questions Playlist - • TCS Coding Questions w...
Video 2 - • TCS Aptitude Questions...
Video 3 - • (Asked 25 times) TCS N...

Пікірлер: 155

  • @PrepInsta
    @PrepInsta3 жыл бұрын

    TCS NQT Online Course - bit.ly/TCS-NQT-and-Ninja-Course

  • @mymotivation4110
    @mymotivation41103 жыл бұрын

    10:40 there is another way sir. We don't need to write all the consonents in condition we can just upgrade the vowel condition as if(b[j]!='a' || b[j]!='e' || b[j]!='i' || b[j]!='o' || b[j]!='u')

  • @Saikumar-kb4lf

    @Saikumar-kb4lf

    3 жыл бұрын

    It should be "&&" instead of "||"

  • @thomaspgeorge4339

    @thomaspgeorge4339

    3 жыл бұрын

    Use '&&' instead of all the '||'

  • @santoshgokul3374

    @santoshgokul3374

    3 жыл бұрын

    @@thomaspgeorge4339 but if we use && then all of the given alphabets must be present right?? in order to make it execute

  • @thomaspgeorge4339

    @thomaspgeorge4339

    3 жыл бұрын

    @@santoshgokul3374 i thought so too....but I tried running the program and only this gives the right output

  • @santoshgokul3374

    @santoshgokul3374

    3 жыл бұрын

    Yeah man you're right I just tried now 😅😅 thanks

  • @NIDHISHARMA-ep6nc
    @NIDHISHARMA-ep6nc5 жыл бұрын

    Thanks to MHADEV.. If this is not visible on my recommended videos then I can't found this type of explaination.... So simple and easy way... Thanks to Atulya Sir

  • @unnatidua4244
    @unnatidua42443 жыл бұрын

    Your explanation is just awesome

  • @divakarkumarjha1171
    @divakarkumarjha11713 жыл бұрын

    Your concept is really awesome

  • @ashishmishra9662
    @ashishmishra96625 жыл бұрын

    Thanks for explaining...I was looking forward towards these topic😁

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Thank you Ashish

  • @alphatech7647
    @alphatech76473 жыл бұрын

    In easy way if we check b[j]!=a,e,i,o,u.etc in a particular situation

  • @purumaheshwari7896
    @purumaheshwari78964 жыл бұрын

    Python solution for this problem a,b,c=input("Enter a string:").split() d='' for i in range(0,len(a)): if a[i] in 'aeiou' : d=d+'%' else: d=d+a[i] e='' for i in range(0,len(b)): if b[i] not in 'aeiou': e=e+'#' else: e=e+b[i] f='' for i in range(0,len(c)): if 96

  • @bhagyavyshnavi3452
    @bhagyavyshnavi34525 жыл бұрын

    well explanation ...

  • @vikramsingh-hm5pf
    @vikramsingh-hm5pf5 жыл бұрын

    printf("%s%s%s",&a,&b,&c); could we use this statement to concatenate the strings?

  • @rishikeshkumarsingh828
    @rishikeshkumarsingh8285 жыл бұрын

    Sir can you make this video in pass the string from command line argument because we will have to take the input using command line argument so please

  • @amanahuja1423
    @amanahuja14233 жыл бұрын

    Hello sir I have bought your prime course .Was having one query that can we use java for coding questions 1 and 2.

  • @artipatil4160
    @artipatil41605 жыл бұрын

    In second part one can use: if(b[j]!='a'&&b[j]!='i'&&b[j]!='o'.......)//vowels with logical and operator

  • @aswinramadas8000

    @aswinramadas8000

    3 жыл бұрын

    @@jsa155 the question says 3 english words right? So i think we shouldnt worry about numbers.

  • @aswinramadas8000

    @aswinramadas8000

    3 жыл бұрын

    @@jsa155 alright, agree with you

  • @shubhamchauhan8299
    @shubhamchauhan82995 жыл бұрын

    We can use else in 2 case with vowel condition.. and we can use tolower function for case 3

  • @shahidrizwan6903

    @shahidrizwan6903

    5 жыл бұрын

    strupr() or toupper() right?

  • @programme261
    @programme2613 жыл бұрын

    for checking of consonant character why should we check by 21 characters , if we can use != condition with vowel so we get same result, am i right? bytheway very good explanation, Thankyou.

  • @sexykillerize
    @sexykillerize3 жыл бұрын

    use != with && operator with all vowels in second condition no need to write all consonants

  • @akshayshukla4358
    @akshayshukla43585 жыл бұрын

    Sir in tcs nqt coding section...is it compulsory for us for write the code using cammand line arguments or simply we can input it through scanf.. plz help!!

  • @zakirjack7064

    @zakirjack7064

    5 жыл бұрын

    command line arguments not in syllabus

  • @sshiv908

    @sshiv908

    5 жыл бұрын

    it will be specified in the given question what to use

  • @PrepInsta
    @PrepInsta5 жыл бұрын

    If you have any question please feel free it ask us in the comment section

  • @akshayraj4964

    @akshayraj4964

    5 жыл бұрын

    Plz provide us a concatenation step to get the desired o/p of this question.

  • @akshayraj4964

    @akshayraj4964

    5 жыл бұрын

    Or can we use strcat(a,strcat(b,c)); statement for concatenation..is this Will be right??

  • @sushmas7233

    @sushmas7233

    5 жыл бұрын

    { char *str1; char *str2; str1=strcat(a, b) ; str2=strcat(str1, c) ; printf("%s", &str2) ; return 0; } Is it correct, please do reply!!!

  • @padmajaarpu8801

    @padmajaarpu8801

    3 жыл бұрын

    #include Int main( int argc, char **argv) Char **items; Int j=argv; For(i=1;(i%4); i++) Int **p=&items(j); Printf("%c", **p); J--; Return 0; Can any one explain this code with example input

  • @akshatvishwakarma9232
    @akshatvishwakarma92325 жыл бұрын

    Sir if our syntax are correct but program is not run due toh error so kuch no milenge thode bht??

  • @saurabhsable4856
    @saurabhsable48565 жыл бұрын

    for NQT 2020...is it compulsory to use command line programming? can't we use simple C or C++....as we are having habits of using them without command line arguments?

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    you can use simple c or c++

  • @explorelife2418
    @explorelife24185 жыл бұрын

    Sir we can use scanf() function in exam right??? Or we have to take input through command line arguments??

  • @shahidrizwan6903

    @shahidrizwan6903

    5 жыл бұрын

    You can take input either way. Both are acceptable.

  • @joychakraborty8533
    @joychakraborty85335 жыл бұрын

    on the 1st part where a[i] ='a' was there you said you are not comparing with ascii values but on the upper case part 'a' how this becomes now ascii?

  • @programme261

    @programme261

    3 жыл бұрын

    yes , i have same doubt

  • @saquibsid3122
    @saquibsid31225 жыл бұрын

    Why will i concatenate .......i could just delete the spaces between %s and %s......it would do the work without adding an extra line to the program...... isn't it?

  • @Durgaprasad-bh7hc
    @Durgaprasad-bh7hc3 жыл бұрын

    sir in printf statement there is ampersand symbol(&)

  • @aakashverma8602
    @aakashverma86025 жыл бұрын

    For consonants we can have done with for loop of aeiou only by using ! Operator

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Hi, Yes, you can also use that as well :)

  • @gowthamreddy6383
    @gowthamreddy63833 жыл бұрын

    sir plz make an playlist on tcs ninja coding questions

  • @arnabbasu4514
    @arnabbasu45144 жыл бұрын

    For making the 3rd word into uppercase, I can also use the string in-built function - strupr(c) It becomes a lot easier

  • @shubhambhosale8467

    @shubhambhosale8467

    3 жыл бұрын

    what about in c++

  • @buttercupxdd
    @buttercupxdd5 жыл бұрын

    for the 3rd part can't we just use strupr( ) ?

  • @robin2binofficialmail844
    @robin2binofficialmail8443 жыл бұрын

    What is the python version for TCS

  • @smtech8087
    @smtech80873 жыл бұрын

    10:13 .........25 of thm r vwls

  • @shivammehta8284
    @shivammehta82845 жыл бұрын

    Better use isupper and other methods of c++

  • @iaashu98
    @iaashu985 жыл бұрын

    You can use toupper() for last case.

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    yes you can use that as well

  • @iaashu98

    @iaashu98

    5 жыл бұрын

    @@PrepInsta thank you, sir.

  • @chandanapriya742
    @chandanapriya7425 жыл бұрын

    Good explanation

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    thank you chandana

  • @ruchitasalekar4956
    @ruchitasalekar49564 жыл бұрын

    sir we have to right whole program/code or just have to write only logic or function snippet ?????' please clear my doubt.

  • @ruchideharia6438

    @ruchideharia6438

    3 жыл бұрын

    Whole compiled and logical program

  • @jatinsingh5503
    @jatinsingh55035 жыл бұрын

    I am in prepinsta's safe hands

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Thanks :) Jatin

  • @vikramhazra9252

    @vikramhazra9252

    3 жыл бұрын

    😂 still stay carefull

  • @tamalikaroy2646
    @tamalikaroy26463 жыл бұрын

    we could have used strupr() func instead nah?

  • @monikaprithivi4250
    @monikaprithivi42504 жыл бұрын

    In constant part why don't we use not equal to instead of printing all 21 alphabet

  • @ruchitasalekar4956
    @ruchitasalekar49564 жыл бұрын

    16:02 in java we have to just use String.toUpper() method. and whole string will be converted in to upper case. in exam can we use pre-define classes and their methods sir?????? or we are not allowed to use them??? please clear my doubt.

  • @neerajk_10

    @neerajk_10

    3 жыл бұрын

    Yes most probably yes. I am saying this because I have used string.h C library in other placement tests (never appeared for TCS though)

  • @poojakurhade8672
    @poojakurhade86725 жыл бұрын

    can you please let me know how to do concatenation so that we get exact o/p mentioned in the question?

  • @dasmala9255

    @dasmala9255

    5 жыл бұрын

    strcat((strcat(a,b)),c); printf("%s",&a); After ending of while loop ,write these lines , program will run successfully.

  • @sandeepsandy9456

    @sandeepsandy9456

    5 жыл бұрын

    This question concatenation of strings came in InfyTQ exam today

  • @shubhamkechale6940

    @shubhamkechale6940

    3 жыл бұрын

    @@dasmala9255 thanks..

  • @tejsurya6355
    @tejsurya63555 жыл бұрын

    Can i know the concepts cut off

  • @bipashapal9703
    @bipashapal97035 жыл бұрын

    Is it mandatory to write code in cmd line arguments??

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    no you can use C, C++, Java perl and python

  • @praveensingh5532
    @praveensingh55323 жыл бұрын

    Sir if we use a[i]!='a'||a[i]!='e' instead of writing all the constant letters we can achieve same result

  • @kanurihemasatyasaidurgapraveen

    @kanurihemasatyasaidurgapraveen

    3 жыл бұрын

    Yes! We can but and operator is used instead of or operator 🙂

  • @achyuttokekar9227

    @achyuttokekar9227

    3 жыл бұрын

    No, because if there are any other characters...instead of alphabet then it will accept them too...

  • @aakritiadarsh8334
    @aakritiadarsh83343 жыл бұрын

    we can concatenate by strcat(a,b,c);

  • @robin2binofficialmail844

    @robin2binofficialmail844

    3 жыл бұрын

    No

  • @mishrithabattiyanda8871

    @mishrithabattiyanda8871

    3 жыл бұрын

    Can make it this way I guess g=strcat(a, b) ; h=strcat(g, c) ; then print h

  • @santoshgokul3374

    @santoshgokul3374

    3 жыл бұрын

    @@mishrithabattiyanda8871 so this means we can only concatenate only two strings at a time?

  • @soumyadeepnath6204
    @soumyadeepnath62045 жыл бұрын

    can we use this to check the consonants : if(!isalpha(b[i]))

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    yes you can use that :)

  • @santoshgokul3374

    @santoshgokul3374

    3 жыл бұрын

    What is this bro?

  • @sahilgaikwad4508

    @sahilgaikwad4508

    3 жыл бұрын

    @@santoshgokul3374 are you preparing for nqt 2021 bro??

  • @santoshgokul3374

    @santoshgokul3374

    3 жыл бұрын

    @@sahilgaikwad4508 yeah man

  • @keerthanavema7576
    @keerthanavema75765 жыл бұрын

    which version of python can be used?2.7 or 3

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Python 3 will be there in exam

  • @MohanKumar-vk6xz
    @MohanKumar-vk6xz5 жыл бұрын

    Sir in python the word of vowels cannot replace by that symbol Eg: a[i]='%'

  • @iaashu98

    @iaashu98

    5 жыл бұрын

    Use escape character

  • @MohanKumar-vk6xz

    @MohanKumar-vk6xz

    5 жыл бұрын

    How to use

  • @sandeepk6294

    @sandeepk6294

    5 жыл бұрын

    Example:-- ur string is s='sandeep' For I in range (Len(s)): If(s[I]=='a'): s.replace(str(s[I]), '@')

  • @sourinbhowmick5971

    @sourinbhowmick5971

    3 жыл бұрын

    You can also append in to list

  • @trendingno.1934
    @trendingno.19345 жыл бұрын

    I am from mechanical background . Can u start coding classes from zero . Sir i m not good in coding but ' I WANT ' to be good.

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Yes, in our online classes we focus on that itself.

  • @swatisingh4682
    @swatisingh46825 жыл бұрын

    Is there any online paid course? For all basic c language

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    no there isn't as of yet!

  • @soumyadeepnath6204

    @soumyadeepnath6204

    5 жыл бұрын

    Refering to Books by C.P.Arora and BalaGuruswami and reading the manual in dev C's "help" section, helped me a lot.

  • @EEE--AbhishekNayak
    @EEE--AbhishekNayak Жыл бұрын

    data = [] result = '' for i in range(3): data.append(input("Enter the word ")) print(data) for i in data[0]: if i in ['a','e','i','o','u']: data[0] = data[0].replace(i,'%') else: continue for i in data[1]: if i not in ['a','e','i','o','u']: data[1] = data[1].replace(i,'#') else: continue for i in data[2]: data[2] = data[2].upper() for i in data: result = result + i print(result)

  • @PrepInsta

    @PrepInsta

    11 ай бұрын

    Join our TA Support Group on Discord, where we will help you out with all your queries: prepinsta.com/discord/

  • @wisdombro4655
    @wisdombro46553 жыл бұрын

    Getting error 'gets' is invalid

  • @shivangigupta2708
    @shivangigupta27085 жыл бұрын

    very well explained

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Thank you shivangi

  • @Acoustic_ash
    @Acoustic_ash3 жыл бұрын

    Why did you consider "e" as a consonant 😁

  • @RupeshKumar-nm4jx
    @RupeshKumar-nm4jx5 жыл бұрын

    Sir, the third word is not converted into Uppercase

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Hey, please check the code. That you've written because as per our code it is getting convereted.

  • @Akshay-jl7os
    @Akshay-jl7os5 жыл бұрын

    Sir can I update tcs nqt form after 24 July ??

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Yes you can update it before hall ticket generation

  • @Akshay-jl7os

    @Akshay-jl7os

    5 жыл бұрын

    Thanks sir

  • @shaikrizwan5104
    @shaikrizwan51045 жыл бұрын

    We want still more methods on it

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Will post them soon

  • @hindustanibhau7026
    @hindustanibhau70265 жыл бұрын

    got placed in tcs because of prepinsta

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Thank you apoorva :)

  • @SimranSingh-xu8qh

    @SimranSingh-xu8qh

    5 жыл бұрын

    Hey apurva...m preparing for nqt 2020 can you please help me?

  • @SimranSingh-xu8qh

    @SimranSingh-xu8qh

    5 жыл бұрын

    @Apoorva Jain

  • @hunachigi9824
    @hunachigi98245 жыл бұрын

    How to concatanate plz let me know sir

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    It is your homework its simple and basic just google

  • @dasmala9255

    @dasmala9255

    5 жыл бұрын

    @@PrepInsta strcat((strcat(a,b)),c); printf("%s",&a); After ending of while loop ,write these lines , program will run successfully. I think this method is correct. Isn't it?

  • @shahidrizwan6903

    @shahidrizwan6903

    5 жыл бұрын

    Just print all together

  • @shreyamandal64
    @shreyamandal645 жыл бұрын

    can you please give it in java Language?

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    prepinsta.com/tcs-coding-questions/ you can find the code here

  • @ganeshb.v.s1679
    @ganeshb.v.s16795 жыл бұрын

    Can I know the aptitude cutoff

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    70%

  • @er.abhishekgupta195
    @er.abhishekgupta1955 жыл бұрын

    Video is not cleared properly

  • @809ritikaraj6
    @809ritikaraj63 жыл бұрын

    Scored 1297 in aptitude and 51 in programming. M I qualified?

  • @curiouscucumber7162

    @curiouscucumber7162

    2 жыл бұрын

    did u?

  • @abhiseksah1972
    @abhiseksah19725 жыл бұрын

    Correct me if i am wrong,if we want to concatenate the words i think simply we can write printf("%s%s%s",a,b,c); Instead of printf("%s %s %s",a,b,c);

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    yes, you can do that as well :)

  • @divyajain2733
    @divyajain27333 жыл бұрын

    Sir please send me this code in java...please

  • @charan4002

    @charan4002

    3 жыл бұрын

    You can find code in prep insta website

  • @anne_pandey
    @anne_pandey5 жыл бұрын

    bro instead of using C , you should use JAVA its hardly 8 lines of code for the given problem statement. ---------------------------------------------------------------------- public class LogicalQuestion { public static void main(String[] args) { // TODO Auto-generated method stub String word1,word2,word3; Scanner input = new Scanner(System.in); word1 = input.next(); // reads only one word word2 = input.next(); word3 = input.next(); // Replace all vowel to % word1 = word1.replaceAll("[AEIOUaeiou]", "%"); // Replace all consonants to # word2 = word2.replaceAll("[BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz]", "#"); // Replace third word to upper case word3 = word3.toUpperCase(); // at last concatenate all the three words System.out.println(word1+word2+word3); } }

  • @oldcartoonworld1960
    @oldcartoonworld19602 жыл бұрын

    Technique was not good, the b[j] part could be done in short and easy trick...

  • @achalmudgal1861
    @achalmudgal18615 жыл бұрын

    hlw Atulya sir,. i used to message you on your whatsapp no. please reply.

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    Hey, Atulya sir is on leave till tuesday. I think he will reply onc ehe is back.

  • @sajeedkhans7616
    @sajeedkhans76165 жыл бұрын

    2nd part worst explanation bro

  • @ayushpriyadarshi4049
    @ayushpriyadarshi40495 жыл бұрын

    If anyone wants to see the code in python: def splitString(newList): #Function to convert the string into list form newA = newList.split(" ") a = how are you , newA =[ "how" , "are" , "you"] return newA def convertString(x): p = [char for char in x[0]] # Traversing character by character in 1st word in list i.e "how" e = ' ' f = ' ' g = ' ' for i in range(0, len(p)): if p[i] == 'a' or p[i] == 'e' or p[i] == 'i' or p[i] == 'o' or p[i] == 'u': p[i] = '%' e += p[i] q = [char for char in x[1]] #Traversing character by character in 2nd word in list i.e "are" for i in range(0, len(q)): if q[i] != 'a' and q[i] != 'e' and q[i] != 'i' and q[i] != 'o' and q[i] != 'u': q[i] = '#' f += q[i] r = x[2].upper() #Converting 3rd word into uppercase g = e + f + r #Concatenating all the 3 word return g a = input("Enter a 3 word String : ") li = splitString(a) print(convertString(li))

  • @PrepInsta

    @PrepInsta

    5 жыл бұрын

    great :)

  • @srinivasareddytelukuntla1305
    @srinivasareddytelukuntla13053 жыл бұрын

    The way ur explaining is not satisfying