Consider the following code snippet:

        static void Main(string[] args)
        {
            Dictionary<string, short> isdCodes = new Dictionary<string, short>();
            isdCodes.Add("Germany", 49);
            isdCodes.Add("Australia", 61);
            isdCodes.Add("Mexico", 52);
            isdCodes.Add("Spain", 34);
            isdCodes.Add("Sweden", 46);
            isdCodes.Add("India", 91);

            // LINE 01 - code to written here for filtering the desired result

            foreach (var item in result)
            {
                Console.WriteLine(item.Key + "\t" + item.Value);
            }
        }

Identify the code snippet which needs to be written at LINE 01 of the Main() method, so that it produces the result as "India 91" when executed?

var result = isdCodes.Where(c => c.Value > 50 && c.Value.Length == 5);

var result = isdCodes.Where(c => c.Value > 50 && c.Key.Length == 5);

var result = isdCodes.Where(c => c.Value > 50 || c.Key.Length == 5);

var result = isdCodes.Where(c => c.Key.Length == 5);

Verified Answer
Correct Option - b

To get all Advanced CSharp Programming Assessment Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in