CS Interview Questions

ms_cs
@ms-cs-Ab8svl โ€ข Oct 23, 2024

Hello CEans,

I am wondering and ๐Ÿ˜”, In CE we don't have a specific thread to have the discussions on CS Technical Interview Questions.

This thread is all about the CS interview questions. Any can post question here, irrespective of their department. In general, The interview questions are somewhat twisted like puzzles,so it will be interesting to solve those questions.

Expecting masterminds awesome answers and lightning questions:twisted:๐Ÿ˜

PS:
After the question is answered here, also it is updated in the following thread
#-Link-Snipped-#
You can refer it here easily

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Kaustubh Katdare

    @thebigk • Jun 29, 2009

    Cool. Thread moved to jobs/careers section

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    Let me first post the simple question..(Agile Software Corporation)


    No-1
    [ java ]
    ++i+ ++j is equivalent to
    (a)i+j+1
    (b)i+j+2
    (c)i+j
    (d)can't be compiled

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    No-2(Agile Software Corporation)

    What is the output

    #!/bin/perl
    kill โ€“0 pid

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    No-3

    Randomization is good for which algorithm(quick sort, heap sort, selection sort, hashed table, โ€ฆ.

  • Kaustubh Katdare

    @thebigk • Jun 29, 2009

    Also contribute solutions along with the questions. [Don't have questions & answers in separate posts in this thread]

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    The_Big_KAlso contribute solutions along with the questions. [Don't have questions & answers in separate posts in this thread]

    Nice idea , But that will not be interesting I think,

    We can request CEans to answer with quoting that question. What do you say Big_K

  • shalini_goel14

    @shalini-goel14-ASmC2J • Jun 29, 2009

    ms_csLet me first post the simple question..(Agile Software Corporation)


    No-1
    ++i+++j is equivalent to
    (a)i+j+1
    (b)i+j+2
    (c)i+j
    (d)can't be compiled(correct)

    Which language?

    ms_csNo-3

    Randomization is good for which algorithm(quick sort, heap sort, selection sort, hashed table, โ€ฆ.

    Heapsort is the answer ?

  • kashish0711

    @kashish0711-H4bbxV • Jun 29, 2009

    ms_csLet me first post the simple question..(Agile Software Corporation)


    No-1
    ++i+++j is equivalent to
    (a)i+j+1
    (b)i+j+2
    (c)i+j
    (d)can't be compiled(correct)


    d) i++; j++;

    I saw this in my book 2 years earlier haha
    idk if I am correct
    but havent seen any thing like ++i+++j ๐Ÿ˜›
    I am very weak in languages thx to my teacher.๐Ÿ˜ก

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    @shalini: The Question is updated now

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    shalini_goel14
    No-3

    Randomization is good for which algorithm(quick sort, heap sort, selection sort, hashed table, โ€ฆ.
    Heapsort is the answer ?

    Heap sort is not and
    Answer: Quicksort

  • kashish0711

    @kashish0711-H4bbxV • Jun 29, 2009

    was my correct, was my correct?? ๐Ÿ˜
    haha I am going crazy for result. ๐Ÿ˜›

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    kashish0711was my correct, was my correct?? ๐Ÿ˜
    haha I am going crazy for result. ๐Ÿ˜›

    You are really crazy๐Ÿ˜‰..
    Here post answers or tech questions

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    No-4

    find legal statements [ java]
    (a)int a=30;
    (b)float f=1.4;
    (c)double d=34.5;
    (d)byte b=128;

  • kashish0711

    @kashish0711-H4bbxV • Jun 29, 2009

    ms_csYou are really crazy๐Ÿ˜‰..
    Here post answers or tech questions

    lolz k

    Ok tell this one,

    1. We say current flows in wire, then when we give electricity to one end of cable, and other is kept in a tub, then the current should fall from that end is inside the tub? If yes, then why? If No, then why?

    2. Who was the man who invented the famous A.C. motor?

    3. Are we looking for any new system from electric transmission for long routes other than with cables?

    4. What role does frequency plays in electric transmission?


    Good Luck everyone. ๐Ÿ˜
    These are the easiest I could think. ๐Ÿ˜›

    expecting very quick answers from Big K ๐Ÿ˜

  • CEMember

    @cemember-PlqlWH • Jun 29, 2009

    ms_csNo-4

    find legal statements [ java]
    (a)int a=30;
    (b)float f=1.4;
    (c)double d=34.5;
    (d)byte b=128;

    Following are legal statements : (a) and (c)
    int a =30;
    &
    double d=34.5

    float f=1.4f;
    &
    byte b= (byte) 128;

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    that is correct answer CEMember.

    We have two unanswered questions CEans ๐Ÿ˜€

    No-1
    [ java ]
    ++i+ ++j is equivalent to
    (a)i+j+1
    (b)i+j+2
    (c)i+j
    (d)can't be compiled

    No-2(Agile Software Corporation)

    What is the output

    #!/bin/perl
    kill โ€“0 pid

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 29, 2009

    No-5

    the sorting method which don't generally use recursion
    (a)heap sort
    (b)bubble sort
    (c)quick sort
    (d)strand sort

  • shalini_goel14

    @shalini-goel14-ASmC2J • Jun 29, 2009

    ms_csNo-1
    [ java ]
    ++i+ ++j is equivalent to
    (a)i+j+1
    (b)i+j+2
    (c)i+j
    (d)can't be compiled

    Well, if I assume semicolon is placed after it, then answer is (a) else answer is (d)

    ms_csNo-5

    the sorting method which don't generally use recursion
    (a)heap sort
    (b)bubble sort
    (c)quick sort
    (d)strand sort

    Bubble sort ?

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 30, 2009

    @shalini: you are very correct

    No -5
    Yes it is bubble sort

    No -1
    Answer is 'can't be compiled'

  • kashish0711

    @kashish0711-H4bbxV • Jun 30, 2009

    ms_csNo -1
    Answer is 'can't be compiled'

    see I was right ๐Ÿ˜Ž


    edit: where are other engineers?
    this is supposed to be a universal thread, featuring interview questions from all trades, right?
    where is everybody?

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 30, 2009

    No-6 :

    [ Oracle DBA]
    SNAPSHOT is used for
    a. Synonym, b. Table space, c System server, d Dynamic data replication

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 30, 2009

    kashish0711see I was right ๐Ÿ˜Ž

    ๐Ÿ˜Ž dude...

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 30, 2009

    No-7

    [ Oracle ]
    LGWR process writes information into
    a Database files, b Control files, c Redolog files, d All the above.

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 30, 2009

    No -8

    [ Oracle ]
    The packaged procedure that makes data in form permanent in the Database is
    a Post
    b Post form
    c Commit form
    d None of the above

  • shalini_goel14

    @shalini-goel14-ASmC2J • Jun 30, 2009

    ms_csNo-7

    [ Oracle ]
    LGWR process writes information into
    a Database files, b Control files, c Redolog files, d All the above.

    (c) - Redo log files?

  • ms_cs
    ms_cs OP

    @ms-cs-Ab8svl • Jun 30, 2009

    @shalini: C is correct answer,

  • silverscorpion

    @silverscorpion-iJKtdQ • Jul 1, 2009

    ms_cs@shalini: you are very correct

    No -1
    Answer is 'can't be compiled'


    Why can't it be compiled??

    I thought i+j+2 was the correct answer. At least. that's how it would work in C.

    ++i + ++j;

    I do think this equals i+j+2; only..

    PS : I dunno how this works n Java!!

  • shalini_goel14

    @shalini-goel14-ASmC2J • Jul 1, 2009

    silverscorpionWhy can't it be compiled??

    Because it was not ended with semicolon . All statements in java must end with semicolon. ๐Ÿ˜€

    And yes regarding ++i + ++j - you are right it is equivalent to i+j+2[as per Java also ๐Ÿ˜€] . I considered it wrong in hurry as ++i + j++

  • hamburg113

    @hamburg113-HJozvP • May 8, 2011

    Hi

    I found that a member asked same question in this forum some months ago.

    Pls use search box to find this questions with comments

    If you want to get more materials that related to this topic, you can visit: #-Link-Snipped-#

    Best regards.