google.com, pub-7659628848972808, DIRECT, f08c47fec0942fa0 Pro Learner: Functions in c++

Please click on ads

Please click on ads

Saturday 30 January 2021

Functions in c++

 हेलो गाइस,

तो आज मैं आपको बताऊंगा की function\क्या होता है

फंक्शन एक ब्लॉक होता है जिसमें हम कोड लिखते है। 

फंक्शन को हम मैं से पहले लिखते  है ;

फंक्शन को हम पैरेंथेसेस () से दर्शाते है ;

जिसके आगे यहाँ ब्रैकेट लगा होता है वो एक फंक्शन होता है। 

main भी एक फंक्शन होता है but वो एक pre-define फंक्शन होता है जो की जावा मैं पहले से ही होता है। 

लाइन जिस फंक्शन के बारे मैं हम आज पड़ने जा रहे है उससे हम और प्रोग्रामर खुट क्रिएट करते है ;

syntex -void myFunction() {

  // code to be executed
}

example -#include<iostream>
using namespace std;
//void ankush(string name){
//cout<<"hey guys"<<name;
void ankush();

int main(){
ankush();
return 0;
}
void ankush(){
cout<<"asahd";
}



थैंक्स फॉर वाचिंग। . 
moe डिटेल्स comment 

2 comments: