Are these interview questions too challenging for beginners

0 votes

So I just finished interviewing two persons and administering "tests" to assess their abilities. Both are entry-level candidates, with one of them still in college. The following code was not found to be incorrect by either candidate.

Obviously, I do, otherwise I wouldn't have chosen those instances. Do you believe these questions are too difficult for inexperienced programmers to answer?

I suppose I should also mention that neither of them had any expertise with C#... but I don't believe the problems are language-related.

//For the following functions, evaluate the code for quality and discuss.  E.g.
//E.g. could it be done more efficiently? could it cause bugs?        
public void Question1()
{
    int active = 0;

    CheckBox chkactive = (CheckBox)item.FindControl("chkactive");
    if (chkactive.Checked == true)
    {
        active = 1;
    }

    dmxdevice.Active = Convert.ToBoolean(active);
}

public void Question2(bool IsPostBack)
{
    if (!IsPostBack)
    {
        BindlistviewNotification();
    }

    if (lsvnotificationList.Items.Count == 0)
    {
        BindlistviewNotification();
    }
}


//Question 3
protected void lsvnotificationList_ItemUpdating(object sender, ListViewUpdateEventArgs e)
{
   ListViewDataItem item = lsvnotificationList.Items[e.ItemIndex];
   string Email = ((TextBox)item.FindControl("txtEmailAddress")).Text;
   int id = Convert.ToInt32(((HiddenField)item.FindControl("hfID")).Value);

   ESLinq.ESLinqDataContext db = new ESLinq.ESLinqDataContext();
   var compare = from N in db.NotificationLists
                 where N.ID == id 
                 select N;
   if (compare.Count() > 0)
   {
       lblmessage.Text = "Record Already Exists";
   }
   else
   {
       ESLinq.NotificationList Notice = db.NotificationLists.Where(N => N.ID == id).Single();
       Notice.EmailAddress = Email;
       db.SubmitChanges();
   }
   lsvnotificationList.EditIndex = -1;
   BindlistviewNotification();
}
Jun 10, 2022 in C# by rajiv
• 1,620 points
804 views

1 answer to this question.

0 votes
As a new employee, I would expect employers to be more interested in my thought processes than in whether or not the response was "right." I could come up with some responses to these questions, but they would almost certainly be incorrect. :)

As a result, I believe you could get away with these questions, but you should probably be a little more lenient with the "right" response.

I don't think it's a bad thing to obtain a blank sheet with no thoughts as long as those criteria are made clear. This indicates that they either believe the code is ideal (which we all know is virtually never the case) or are too embarrassed to express their opinions (which is also a bad thing).

So, yes. The questions are harsh and can even be a deterrent to some.
answered Jun 11, 2022 by pranav
• 2,590 points

Related Questions In C#

0 votes
1 answer

Simple VB or C# questions for an interview

The difficulty with asking language-specific questions for ...READ MORE

answered Jun 13, 2022 in C# by krishna
• 2,820 points
461 views
0 votes
1 answer

What are the correct version numbers for C#?

On Wikipedia, you may find the most ...READ MORE

answered May 31, 2022 in C# by rajiv
• 1,620 points
426 views
0 votes
1 answer

Good C# interview questions book

If you're simply familiar with the foundations ...READ MORE

answered Jun 7, 2022 in C# by rajiv
• 1,620 points
377 views
0 votes
1 answer

C# Potential Interview Question…Too hard?

This isn't a question I'd ask in ...READ MORE

answered Jun 7, 2022 in C# by rajiv
• 1,620 points
416 views
0 votes
3 answers

Trying to upload files using Selenium(C#)

You can try using Javascript Executor to ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,140 points
5,716 views
0 votes
1 answer

Deploy my Windows 10 IOT core application locally!

Of course, you, can! That is, in ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,109 views
+6 votes
16 answers

How do backend of these really cool games work?

Most of the games these days don't ...READ MORE

answered Jul 19, 2018 in Career Counselling by Kalgi
• 52,350 points
11,294 views
0 votes
1 answer

SQLite.Net not being able to create text file in Win IoT Library!

That exception comes when access limited to ...READ MORE

answered Aug 3, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,003 views
0 votes
1 answer

C# books or web sites for C++

I would recommend checking out C# in ...READ MORE

answered Jun 6, 2022 in C# by pranav
• 2,590 points
495 views
0 votes
1 answer

Correct syntax for main method

Both ways are correct. But taking the ...READ MORE

answered Jun 7, 2022 in C# by pranav
• 2,590 points
619 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP