const number=[3,4,5,12]; let sum=0; let count=0; for(let i=0;i<number.length;i++) { if(number[i]%3==0) { sum=sum+number[i]; count++; } } console.log('3Sum='+sum+',3Count='+count);
Read More »Latest Post
What is an array.Why do we use arrays
An array is a data structure, which can store a fixed-size collection of elements of the same data type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
Read More »Write a Javascript program for Insert Angular, React and Node after Javascript
const techs=['Python','Javascript','C','Java']; console.log(techs); for(let i=0;i<techs.length;i++) { if(techs[i]=='Javascript') { techs.splice(i+1,0,'Angular','React','Node'); break; } } console.log(techs);
Read More »Remove Hello from array Javascript Program with source code
const strings=['Hi','Hello','X','Y']; for(let i=0;i<strings.length;i++) { if(strings[i]=='Hello') { strings.splice(i,1); break; } } console.log(strings);
Read More »All Unit MCQ’s Questions of Image Processing for AKTU Exam 2021
MCQ’s Questions of Image Processing Unit 1 1. What is the first and foremost step in Image Processing?a) Image restorationb) Image enhancementc) Image acquisitiond) Segmentation Answer: c 2. In which step of processing, the images are subdivided successively into smaller regions?a) Image enhancementb) Image acquisitionc) Segmentationd) Wavelets Answer: d 3. What is the next step in image processing after compression?a) …
Read More »All Unit MCQ’s of Data Compression AKTU Exam 2021
Unit 1 Data compression means to the file size. IncreaseDecreaseCan’t sayNone of the above Answer Correct option is B Data compression and encryption both work on binary FalseTrue Answer Correct option is B What is compression? To compress something by pressing it very hardlyTo minimize the time taken for a file to be downloadedTo reduce the size of data to save …
Read More »
Define a function that a number n as parameter and returns the sum of the
numbers from 1 to n Javascript Program
let n=20; function findSum(n) { let sum = 0; for (let x = 1; x <= n; x++) sum = sum + x; return sum; } console.log(findSum(n));
Read More »Given a string remove all + present together in the string. Javascript Program
Input string =’a+++b++c+’; Output String=a+b+c+ Source Code let str='a+++b++c+'; let outStr=''; let len=str.length; for(let i=0;i<len;i++) { if(str[i]=='+'&&str[i+1]=='+') { outStr=outStr+''; } else { outStr=outStr+str[i]; } } console.log(outStr);
Read More »Top 50+ Computer architecture interview questions | COA questions
COA interview questions – Top 50+ computer architecture interview questions Computer architects use specialized knowledge of computer software and hardware structure to improve the performance of computer systems. To increase your chances of getting hired, you need to prepare for the interview. In this article, we take a look at some of the common computer architecture interview questions, including their …
Read More »Given a string str, create a string consisting of all the non-alphabets and non-digits.
JavaScript code let str='q#w2@B**g'; let len=str.length; let alpha=''; let alpha1=''; let rest=''; let digits=''; for(let i=0;i<len;i++) { if(str[i]>='a'&&str[i]<='z') { alpha=alpha+str[i]; } else if(str[i]>='A'&&str[i]<='Z') { alpha1=alpha1+str[i]; } else if(str[i]>='0'&&str[i]<='9') { digits=digits+str[i]; } else { rest=rest + str[i]; } } console.log(rest);
Read More »Top 150+ Computer Organization and Architecture MCQ Questions
COA INTRODUCTION: Computer Organization and Architecture is the study of internal working, structuring and implementation of a computer system. Architecture in computer system, same as anywhere else, refers to the externally visual attributes of the system. Top 150+ COA MCQ | Computer Organization and Architecture Multiple Choice Questions :In Reverse Polish notation, expression AB+CD is written as(A) ABCD+(B) ABCD+(C) ABCD+(D) …
Read More »Top 50+ Computer Organization and Architecture MCQ Questions
Top 50+ Computer Organization and Architecture MCQ Questions – Computer Organization and Architecture INTRODUCTION: Computer Organization and Architecture is the study of internal working, structuring and implementation of a computer system. Architecture in computer system, same as anywhere else, refers to the externally visual attributes of the system. Top 50+ COA MCQ | Computer Organization and Architecture Multiple Choice Questions …
Read More »