Posts

Showing posts from June, 2023

TCS NQT Coding Question 2022

Image
TCS NQT Coding Question 2022 SOLVING USING BASIC C PROGRAMMING QUESTION:     Problem Statement – Given a string S(input consisting) of ‘*’ and ‘#’. The length of the string is variable. The task is to find the minimum number of ‘*’ or ‘#’ to make it a valid string. The string is considered valid if the number of ‘*’ and ‘#’ are equal. The ‘*’ and ‘#’ can be at any position in the string. Note : The output will be a positive or negative integer based on number of ‘*’ and ‘#’ in the input string.

TCS Programming Questions with Answers for Freshers​​

Image
TCS Programming Questions with  Answers for Freshers Solving using the C program QUESTION:      Problem Statement – An automobile company manufactures both a two-wheeler (TW) and a four-wheeler (FW). A company manager wants to make the production of both types of vehicle according to the given data below: 1st data, Total number of vehicles (two-wheeler + four-wheeler)=v 2nd data, Total number of wheels = W The task is to find how many two-wheelers as well as four-wheelers need to manufacture as per the given data.

Solving C programming

Image
 PROBLEM IN C PROGRAMMING QUESTION:         You are a wizard who possesses a magic wand that can be used to change the values of an array. Your wand has two powers: Increase and Decrease . With each use of the wand, you can either increase or decrease any element of the array by 1 . One day, a group of villagers came to you with a problem. They had an array of positive integers of size N and a set of queries of size M. For each query, queries[i] , they wanted to make all the elements of the array equal to queries[i] using your magic wand. To help the villagers, you decided to use your magic wand to perform the operations. However, each time you perform an operation, the cost of using your wand increases. The cost of using your wand for an operation on an element is equal to the absolute difference between the value of the element and the desired value after the operation . Example: If you want to change an element from 5 to 3, it will cost you 2. If you wa...

PROGRAMMING - Webster Guiding

PROGRAMMING PARADIGMS Definition:      Programming paradigms are different ways or styles in which a given program or programming language can be organized. Each paradigm consists of specific structures, features, and opinions about how common programming problems should be tackled ( STYLE OF CODING ).