“HAPPINESS SHOULD BE A FUNCTION WITHOUT ANY PARAMETERS”

Week 0: Assignment 0 Question 2 NPTEL Introduction to Programming in C (20 July -11 Sep) 2020.



        Introduction to Programming in C       

Assignment 0_Question 2:


-> Input : Two even integers.

Output : Average of those numbers

PROGRAM:

#include <stdio.h>

int main()
{
  int a,b;
  
  scanf("%d",&a);
  scanf("%d",&b);
  
    printf("%d",(a+b)/2);

    return 0;
}
WEEK-1 :INTRODUCTION TO PROGRAMMING IN C

CLICK ON BELOW LINK.
<<CLICK HERE FOR  WEEK 1:ASSIGNMENT 1>>

PLEASE SUBSCRIBE OUR CHANNEL.
<CLICK HERE>
FOLLOW OUR WEBSITE FROM THE BUTTON PROVIDED TO THE BOTTOM OF PAGE TO GET SOON ANSWERS OF PROGRAMS.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100%  correct solutions.

Week 0: Assignment 0 Question 1 NPTEL Introduction to Programming in C (20 July -11 Sep) 2020.



        Introduction to Programming in C       

Assignment 0_Question 1:


-> Write a program to print "Hello C"

PROGRAM:

#include <stdio.h>
int main()
{
    printf("Hello C");

    return 0;
}
WEEK-0 :INTRODUCTION TO PROGRAMMING IN C

CLICK ON BELOW LINK.
<<CLICK HERE FOR  WEEK 0:ASSIGNMENT 0 QUESTION 2>>

PLEASE SUBSCRIBE OUR CHANNEL.
<CLICK HERE>
FOLLOW OUR WEBSITE FROM THE BUTTON PROVIDED TO THE BOTTOM OF PAGE TO GET SOON ANSWERS OF PROGRAMS.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100%  correct solutions.

GREAT OPPORTUNITY TO INTERACT WITH HON. ANAND KUMAR SIR (SUPER 30 FAME) DATE 28 JUNE 2020 (TIME 12 Noon) BY PCET-NUTAN.

PIMPRI CHINCHWAD EDUCATION TRUST(PCET).

NUTAN MAHARASHTRA INSTITUTE OF ENGINEERING AND TECHNOLOGY.




TOPICS:


  • HOW TO PREPARE FOR FOR JEE &CET EXAMS?
  • TIPS AND TRICKS TO GET MAXIMUM SCORE IN JEE & CET?
  • HOW TO SOLVE MORE QUESTIONS IN LESS TIME?
  • SUCCESS STORIES OF REAL SUPER-30 BATCH IIT STUDENTS.
  • YOU CAN ALSO GIVE A TEST.
CLICK ON LINK FOR REGISTRATION:

FOR COLLEGE DETAILS CLICK ON THE LINK GIVEN 
BELOW:

http://www.nmiet.edu.in/

INTRODUCTION TO JAVA, HISTORY OF JAVA, FEATURES OF JAVA AND JAVA FLAVOURS AND USE OF JAVA IN OUR DAILY LIFE.

LEARN JAVA WITH FUN


HISTORY OF JAVA:




JAMES GOSLING

  • Java was developed by James Gosling at Sun Micro systems.
  • Java originated at sun Microsystems, in 1991.
  • Vinod Khosla was the co-founder of Sun Microsystems.
  • On January 27, 2010, Sun was acquired by Oracle Corporation for US $ 7.4 billion.

JAVA IS EVERYWHERE:

  • JAVA resides in mobile,client machines,server machines,embedded devices,smart phones,cloud.etc
  • It shares the same basic features of the language and libraries.
  • Principle of Java : Write once, Run Anywhere(WORA).


JAVA  FLAVOURS:

  • JAVA SE (Core Java)
  • JAVA EE (Advance Java)
  • JAVA ME (Micro Edition for mobiles )
  • Many more...

FEATURES OF JAVA:

  • SIMPLE
  • OBJECT ORIENTED LANGUAGE
  • DISTRIBUTED
  • INTERPRETED
  • ROBUST
  • SECURE
  • PORTABLE
  • MULTI-THREADED
  • GARBAGE COLLECTOR

REMEMBER:

  • Java is a case sensitive language like C and C++.
  • Java is nearly 100% object oriented language.
  • In java, it is not possible to make a function which is not a member of any class(as we can do in c++).

WANT TO LEARN JAVA CLICK HERE  >>>Lecture 1<<<

FLIPKART QUIZ GUESS WHAT ALL ANSWERS OF SPORTS SPECIAL || INDIAN SPECIAL || MOVIES SPECIAL.

FLIPKART QUIZ ANSWERS




Flipkart is an Indian e-commerce company based in Bangalore, Karnataka, India. It was founded by Sachin Bansal and Binny Bansal in 2007. The company initially focused on book sales, before expanding into other product categories such as consumer electronics, fashion, home essentials & groceries, and lifestyle products.

Daily Quiz:

-> Go through the images and answers and you will be the winner next time.
-> All winner do the same things.
-> I will provide you all Flipkart answers.



SPORTS   SPECIAL











































Follow us for the daily updates you will be the next winner.

CLICK ON BELOW LINK FOR MORE IMAGES. 
<<CLICK HERE FOR  SPORTS QUIZ PAGE 2>>
<<CLICK HERE FOR  INDIAN SPECIAL QUIZ ANSWERS>>

ONLINE MCQ'S ON COMMUNICATION AND NETWORKING (FCCN) 2020

ONLINE MCQ'S ON COMMUNICATION AND NETWORKING (FCCN).


1.The_______________is the final block in the communication system which receives message signal and processes it.




... Answer is : C
Destination is the final block in communication system.


2.Signal Attenuation is measured in Units called as ___________.




... Answer is: B


3.The loss of strength of a signal while propagating through a medium is known as _____.




... Answer is: A
The loss of strength of a signal while propagating through a medium is called Attenuation.

4.Message Signal in its Original Frequency range is Called as______________.




... Answer is: B
Message Signal in its Original Frequency range is Called as Baseband. 


5.The entire range of _______that the EM wave can produce oscillations in termed as Electromagnetic Spectrum.




... Answer is: C


6.As Frequency increases , the Period ____________.




... Answer is: B
As Frequency is inversely proportional to period.


7.____________Signal Repeats a Pattern Over and Over Again.




... Answer is: D
As a function returning to the same value at regular intervals.


8.____________Signals can have an INFINITE number of values in a range.




... Answer is: A
Analog signals are signals that vary continuously and can take on an infinite number of values in a given range.


9.A Periodic Signal has a bandwidth of 30 HZ .The Highest frequency is 80Hz. Its Lower Frequency will be______.




... Answer is: B
BW=BW(HIGHEST)-BW(LOWEST), ie BW(LOWEST)=80-30=50Hz.


10.A Composite signal contains frequencies between 2000 to 6000 , What will be BW?




... Answer is: B
BW=BW(HIGHEST)-BW(LOWEST), ie BW=6000-2000=4000. 


11.If a computer on the network shares resources for others to use , it is called _________.




... Answer is: A

12.ISO Stands for_________________________.




... Answer is: A

13.The data link layer divides the stream of bits received from the network layer into manageable data units called ______.




... Answer is: C

14.Satellite has several devices that accept a signal with specified frequency range and rebroadcast it over different frequencies.Those Devices are Known as ________________.




... Answer is: C 
 

15.As Per Nyquist Criteria , the Sampling rate is ______________.




... Answer is: A

16.Message signal in its original frequency range is called as ____.




... Answer is: B

17.The modulated signal is the _______ signal.




... Answer is: A

18.Transmitting the video signal from your camera to your 'TV using a wire represents a _________ communication.




... Answer is: D

19.Which of the following is suitable only for long distance communication?




... Answer is: C

20.The process of shifting the _________ to passband range for transmission is known as modulation.




... Answer is: C


21.The signal which dictates regulation is termed. As ______ signal.




... Answer is: A

22.Wavelength is usually represented by the letter _____.




... Answer is: B


23.What is range of audio frequency?




... Answer is: A


24.Before data can be transmitted, they must be transformed to__________________.




... Answer is: B


25.The completion of one full pattern is called a_______.




... Answer is: A


26.A periodic signal completes one cycle in 0.001s.? What is the frequency.




... Answer is: C
As period is inversely proportional to frequency, ie F=1/T F=1/0.001 =1 kHz.


27.What happens when a sine wave with a phase of 00 starts at time 0 with a zero amplitude?




... Answer is: A
As in sine wave amplitude increases from 0 to 90 degree.


28.The range of frequencies contained in a composite signal is its _____.




... Answer is: B

29.Instead of referring to digital signals as having a period and frequency when measuring a signal's bandwidth, one should refer to ______.




... Answer is: C


30.Set of rules that govern communication is called____.




... Answer is: D
A protocol is a set of rules and guidelines for communicating data.

WEEK:12 PROGRAMMING ASSIGNMENT 2 SOLUTION (Jan 2020-Apr2020) An Introduction to Programming through C++ NPTEL 2020



  

               An Introduction To Programming Through C++


IIT Bombay.

Week 12- Programming Assignment 2:




#include <bits/stdc++.h>
using namespace std;
void printArray(int board[][10], int n)
{
 for(int i=0; i<n; i++)
 {
  for(int j=0; j<n; j++)
  {
   if( board[i][j])
   {
    cout <<j;
   }
  }
 }
 cout << endl;
}
bool isSafe(int board[][10], int i, int j, int n)
{
 for(int row=0; row<i; row++)
 {
  if ( board[row][j] )
  {
   return false;
  }
 }
 int x=i, y=j;
 while(x>=0 && y>=0)
 {
  if( board[x][y] )
  {
   return false;
  }
  x--;
  y--;
 }
 x=i;
 y=j;
 while(x>=0 && y<=n-1)
 {
  if( board[x][y] )
  {
   return false;
  }
  x--;
  y++;
 }
 return true;
}
bool solveNQueen(int board[][10], int i, int n)
{
 if(i==n)
 {
  printArray(board, n);
  return false;
 }
 for(int j=0; j<n; j++)
 {
  if( isSafe( board, i, j, n) )
     {
   board[i][j]=1;
   bool nextQueenRakhPaye= solveNQueen(board, i+1, n);
   if( nextQueenRakhPaye )
   {
    return true;
   }
   board[i][j]=0;
     }
 }

 return false;
 
}


void appendnext(set<vector<int> >& confQueens, vector<int> pos, int n)
{
  int board[10][10]={0};
  solveNQueen(board, 0, n);
   exit(0);
}

FOLLOW OUR WEBSITE FROM THE BUTTON PROVIDED TO THE BOTTOM OF PAGE TO GET SOON ANSWERS OF PROGRAMS.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100%  correct solutions.

WEEK:10 PROGRAMMING ASSIGNMENT 3 SOLUTION (Jan 2020-Apr2020) An Introduction to Programming through C++ NPTEL 2020

  

               An Introduction To Programming Through C++


IIT Bombay.



Week 10- Programming Assignment 3:


Define a class to store an extensible array.  It should be possible to index into the array, and it should be possible to extend the array using a push_back operation.  A skeleton definition of the class is given below.  You are to fill in the ... portions, and then type the entire struct into the textbox of the assignment.  You should implement the protocol that at any time there must be exactly one pointer to space allocated on the heap, and your implementation must prevent memory leaks and dangling pointers.


struct eArray{
private:
  ...  // put data members here
public:
  eArray(){...}  // construct an array with 0 elements
  int &operator[](int i){...}
    // return a reference to the ith element of the array
  void push_back(int v){...}
    // Append v to the current array
    // Use a simple implementation: allocate a new array to
    // accommodate the extra element v.  Then copy the current
    // array into it.  Copy v, and delete the current array.
  int size() const {...}
    // return the current size of the array
    // "const" says this function will not change the receiver
  eArray(const eArray &rhs){...}
    // copy constructor
  ~eArray(){...}
    // destructor
  eArray& operator=(const eArray &rhs){...}
    // assignment operator
};

Using this it should be possible to write programs of the following
kind.  The following programs has already been typed in and will be
used to test your code.

void f(eArray A){A[5] = 5000;}   // changes only local copy
void g(eArray &A){A[6] = 6000;}  // changes original

int main(){
  eArray A,B;
  int n; cin >> n;
  for(int i=0; i<10; i++){
    int v; cin >> v;
    A.push_back(v);
  }
  // at this point A should contain all values read.
  f(A);
  g(A);
  B = A;
  B[8] = 800;
  A[8] = 8000;
  for(int i=0; i<B.size(); i++) cout << B[i] <<' ';
  cout << endl;
}
On input 10 0 10 20 30 40 50 60 70 80 90 this should print 0, 10, 20, 30, 40, 50, 6000, 70, 800, 90.

Note that the eArray as defined above is similar to the vector class in the standard library.  Your implementation can be very simple; whenever an element is appended, you can just allocate a new array of a larger size, copy the elements, and delete the array.  In the vector class, a large memory is allocated every time the current allocation is found inadequate; this way the number of allocation operations is reduced.
Public Test Cases:

Compilation : Passed
Public Test Cases: 3 / 3 Passed

Public Test Cases Input Expected Output Actual Output Status
Test Case 1
0 10 20 30 40 50 60 70 80 90
0 10 20 30 40 50 6000 70 800 90 \n
0 10 20 30 40 50 6000 70 800 90 \n
Passed

Test Case 2
1 2 3 4 5 6 -10 7 -80 9
1 2 3 4 5 6 6000 7 800 9 \n
1 2 3 4 5 6 6000 7 800 9 \n
Passed

Test Case 3
1 2 3 4 5 6 0 7 0 9
1 2 3 4 5 6 6000 7 800 9 \n
1 2 3 4 5 6 6000 7 800 9 \n
Passed



WRITE/COPY THESE CODE DIRECTLY IN NPTEL TERMINAL AND COMPILE AND RUN THEN SUBMIT.

PROGRAM: COPY THE CODE AS PROGRAM IS TOO BIG.

struct eArray{
private:
  int* elements;
  int n;
public:

   eArray(){n=0; elements = NULL;}  // construct an array with 0 elements
  int &operator[](int i){ return elements[i];}
    // return a reference to the ith element of the array
  void push_back(int v){
    int* newE = new int[n+1];
    for(int i=0; i<n; i++) newE[i] = elements[i];
    delete[] elements;
    elements = newE;
    elements[n] = v;
    n++;
  }
  int size() const {return n;}
  eArray(const eArray &rhs){
    n = rhs.n;
    elements = new int[n];
    for(int i=0; i<n; i++) elements[i] = rhs.elements[i];
  }
  ~eArray(){
    delete[] elements;
  }
  eArray& operator=(const eArray &rhs){
    if(this == &rhs) return *this;
    
    delete[] elements; 

    n = rhs.size();
    elements = new int[n];
    for(int i=0; i<n; i++) elements[i] = rhs.elements[i];
    return *this;
  }
};

 
WEEK-10 :PROGRAMMING ASSIGNMENT 1 AND 2 
CLICK ON BELOW LINK.
<<CLICK HERE FOR  WEEK 10:PROGRAMMING -01>>
<<CLICK HERE FOR  WEEK 10:PROGRAMMING-02>> FOLLOW OUR WEBSITE FROM THE BUTTON PROVIDED TO THE BOTTOM OF PAGE TO GET SOON ANSWERS OF PROGRAMS.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100%  correct solutions.