D PRAVEEN KUMAR
BAN USER
I am pursuing PHD in Indian Institute of Technology from the department of Computer Science and Engineering. Research area : Machine Learning algorithms for Wireless Sensor Networks.
- 0of 0 votes
AnswersWrite a C program to print 'n' prime numbers in reverse order?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Analyst - 0of 0 votes
AnswersWrite a program to print Fibonacci sequence in reverse order?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Analyst C - 0of 0 votes
AnswersThere are three numbers a, b, and c. the product of any two numbers is equal to the third number. For example a*b=c or b*c=a or a*c=b. Then what are the possible a, b and c values?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Data Engineer General Questions and Comments - 0of 0 votes
AnswersA Courier running firm want to automate the job of “service coverage area” based on the pin code of the AREA and it should display the message as mentioned below If service is available then display the statement: Service available for the locality: Area Name Otherwise display the statement: No Service available for the locality: Pincode Develop a Python program for the implementation of the above scenario?
- D PRAVEEN KUMAR in United States| Report Duplicate | Flag | PURGE
TCS CodeVita Python - 0of 0 votes
AnswersImplement an Object oriented programming features like Class, Object, Constructor in Python to capture basic details of an Employee like Name, Salary etc. Develop a program to read and display the Employee details along with the total number of employees exists , currently? Hint: i. Make use of Class concept, Object creation and accessing objects using the member functions ii. Make use of constructor to initialize the employee details / employee object\ iii. Create get functions (one for each attribute / property) to display employee details and employee count.
- D PRAVEEN KUMAR in United States| Report Duplicate | Flag | PURGE
TCS CodeVita Python - 0of 0 votes
AnswersA store provides the facility for customer and sales person/manager to view all the products in the alphabetical order of the Products. Which makes tracking easy. Develop a Python program to automate the above task?
- D PRAVEEN KUMAR in United States| Report Duplicate | Flag | PURGE
TCS CodeVita Python - 0of 0 votes
AnswersA Gaming institute want to assign grade / score for each student based on the game results in Finals. So develop an application using Python which will automates to display the list of students, who falls into the below categories in Finals and which will helps the management to provide the scores accordingly? Categories: -Who is a loser at least in one game? -Who is a looser in all the games? Note: i. Consider that, same Associate might be the looser in more than one game ii. There are three games conducted: Chess, Caroms, Long jump ii. Develop a program in such a way that , it works on only on Finalists in each game Hint: i. Use the data structures: List / Dictionary along with the set data structure. ii. Maintain a separate list / dictionary for each game finalists and store couple of students in the list and use these lists for finding out the students, who falls into the above category mentioned in the problem statement For Ex: chessFinalList=['Hanu','Raja','RAMA'] caromsFinalList=['RAJA', 'RAMA','RAMANA'] longJumpFinalList=['RAJA','RAMA','RAVI']
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
TCS CodeVita Python - 0of 0 votes
AnswersPrint 0 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1
- D PRAVEEN KUMAR in India
Follow the below rules
Intialiazation should not be done by 0 i.e. I= 0 should not be done
Only one time a loop or tertiary conditions or increment or decrement should be done
No nested loops or nested conditions only 1 loop or 1 condition should be used
Ex if() or for {}
One loop and 1 condition can't be use.. u can use either this or that| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Data Scientist Algorithm - -1of 1 vote
AnswersWhat is the last digit of the largest prime number?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Analyst Brain Storming - 0of 0 votes
AnswersMr. White is an approximately forty years old father with 4 sons of distinct ages. Writing his age 3 times in succession, we get a 6-digit number that is equal to the product of his age, his wife's age and his 4 sons' ages.
- D PRAVEEN KUMAR in India
Give the sum of his wife's age and all 4 sons' ages.| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Analyst Brain Storming - 0of 0 votes
Answer2^2014 + 1007^4
- D PRAVEEN KUMAR in India
Is this sum equal to a prime number?| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Analyst Brain Storming - 0of 0 votes
AnswersIf a prime 'p' can be expressed as the difference of square of two positive integers, then find the
- D PRAVEEN KUMAR in India
Prime Numbers: Level 1 Challenges
If a prime can be expressed as the difference of square of two positive integers, then find the remainder, when (p^2 + 138 ) is divided by 4.| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Analyst Brain Storming - 0of 0 votes
AnswersConsider a digital clock. The first time after midnight when the three digits are all prime numbers is 2:22 am. What is the last time before 10:00 am when the three digits on the clock are all prime numbers?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Analyst General Questions and Comments - 0of 0 votes
AnswersWrite a program to add the following
- D PRAVEEN KUMAR in India
¼+2/4+3/4+5/3+6/3+...| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C++ - 0of 0 votes
AnswersWrite a program to get the user name and age
- D PRAVEEN KUMAR in India
Condition:
The name should be more than six characters and it shouldn’t contain any other characters than alphabet(like !,@,#,$,^,& these are not to be present)
The age of the employee must between 18-35| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C++ - 0of 0 votes
AnswersIn a college library fines are issued according to the following condition
- D PRAVEEN KUMAR in India
If return books exceeds the due date
Up to 5 days 20rs fine
6-10 days 50rs fine
>10 days 100rs fine
More than 30 days membership will be cancelled
Get the due date from the user and calculate| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C++ - 0of 0 votes
Answerwrite a program to implement following logic
- D PRAVEEN KUMAR in India
If the price of the book in between 100 to 500 book is “Normal Book”
If the price is between 501 and 5000 book is “Costly book”
If greater than 5000 than book is “precious book”| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C - 1of 1 vote
AnswerWrite a program to implement following logic
- D PRAVEEN KUMAR in India
An employee can be promoted if
a) He has good communication skills
b) He is good in training
c) He is either good in programming or debugging.| Report Duplicate | Flag | PURGE
HTC Global Services Software Developer C - 0of 0 votes
AnswerAn instruction pipeline has the speedup factor 10 while operation with 80% efficiency. What could be the number of stages in the pipeline?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer Computer Architecture & Low Level - 0of 0 votes
AnswerConsider a four stage pipeline with the respective delays t1=60nSeconds, t2=70nSeconds, t3=100nSeconds, t4=80nSeconds and the latch delay of 10nSeconds. What is the approximate speedup when the very large number of instructions on pipeline?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer Computer Architecture & Low Level - 0of 0 votes
AnswersSuppose that a system taken 90% of the computation can be parallelized, What is the maximum speedup we can except from 8 processors according to the Amdahl’s law?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer Computer Architecture & Low Level - 0of 0 votes
AnswerConsider a system with three processes and four resources. Resource R1 and R3 with one instance, R2 with two instance, process P1 holding an instance of R2 and waiting for r1,process P2 is holding an instance of R1 and R2 and waiting for R3,process P3 is holding an instance of R3. Is it possible to apply the Resource allocation graph algorithm to avoid deadlock? Explain.
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer Operating System - 0of 0 votes
AnswersConsider a disk drive with the specifications of 16 platters, 2 surfaces, 512 tracks, 2K sectors and 4KB page or sector size. What is the capacity of the disk drive in terms of bytes?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer Operating System - 0of 0 votes
AnswerConsider a system where counting semaphore initialized to +17, on this semaphore variable the various operations like 23P, 18V, 16P, 14V and 1P are performed. Then what is the final value of semaphore?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer Operating System - 0of 0 votes
AnswersLet the average process size be s bytes and the page size be p bytes. Furthermore, assume that each page entry requires e bytes. Derive the optimal page size.
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer Operating System - 0of 0 votes
AnswersProcess ID Arrival Time Burst
- D PRAVEEN KUMAR in India
P1 arrived at 0 and need10 units burst time, P2 is arrived at 1 and need 8 units of burst time, process P3 is arrived at 2 and need 6 units of burst time and process P4 arrived at 3 and need 4 units of burst time.
Assume that context switch takes one unit of time. Draw that gant chart and find the average waiting time, turnaround time using SJF scheduling.| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Developer Operating System - 0of 0 votes
AnswersA program P reads in 500 integers in the range (0,100) representing the scores of 500 students. It then prints the frequency of each score above 50. Implement program P in C language.
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Software Engineer / Developer C - 0of 0 votes
AnswersCan we execute a C program with out main?
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
Skill Subsist Impulse Ltd Tech Lead C - 0of 0 votes
AnswersWrite a program to display the series 1,2,6,15,31,56,......,N
- D PRAVEEN KUMAR in India| Report Duplicate | Flag | PURGE
PRATIAN Java Developer C - 1of 1 vote
AnswersWrite a C program to calculate multiplication between two numbers with repetitive additions
- D PRAVEEN KUMAR in United States| Report Duplicate | Flag | PURGE
C
Smart work means getting more output in small time duration.
Hard work means getting less output in large time duration.
Example:
Hard work: Cutting the tree from top to bottom.
Smart work: Cutting the tree only at the bottom.
There are infinitely many prime numbers, so there is no 'largest prime'
- D PRAVEEN KUMAR September 04, 2017f(1) = 0
f(2) = 2* f(1)+4*f(0)=2+4k
f(3) = 2*f(2)+4*f(1)
= 2(2+4k)+4
= 4+8k+4
= 8+8k
f(4) =2*f(3)+4*f(2)
=2(8+8k)+4(2+4k)
=16+16k+8+16k
= 32k + 24
f(4)=88 means
32k+24=88
32k =64
k= 2
int fun(int n){
if(n%2==0)
retrun n;
else
return fun(3*n+1);
}
Tn=tmax + d = 100+10 = 110
Tp = (60+70+100+80)=310
S= Tp / Tn
=310 / 110
= 2.8
Speedup factor S=10
Efficiency e= 80%= 0.8
Efficiency e= (Speedup factor s)/(Number of stages k) e= S/k
From this k= S/e
K=S/e=10/0.8=12.5 ͌ 13 stages
90% of the time is taken for parallelized means only 10% of the time is spent on computation. Α = 10%= 0.1
Speedup factor S = n/(1+(n-1)α)
S= 8/(1+(8-1)*0.1)
S ͌ 4.7
Or
S= 1/ (α+(1- α)/n)
S= 1/(0.1+(1-0.1)/8)
S ͌ 4.7
90% of the time is taken for parallelized means only 10% of the time is spent on computation. Α = 10%= 0.1
Speedup factor S = n/(1+(n-1)α)
S= 8/(1+(8-1)*0.1)
S ͌ 4.7
Or
S= 1/ (α+(1- α)/n)
S= 1/(0.1+(1-0.1)/8)
S ͌ 4.7
P= down=decrement
V=up=increment
S=+17
S=+17-23+18-16+14-1
=+9
#include<stdio.h>
main()
{
int num;
char str[2][]={"EVEN","ODD"};
printf("ENTER ANY NUMBER:");
scanf("%d",&num);
printf("GIVEN NUMBER IS %s",str[num%2]);
}
240
- D PRAVEEN KUMAR February 09, 2018