Search
 
SCRIPT & CODE EXAMPLE
 

C

return multiple values using the call by reference

#include<stdio.h>
void div(int a, int b, int *quotient, int *remainder) {
   *quotient = a / b;
   *remainder = a % b;
}
main() {
   int a = 76, b = 10;
   int q, r;
   div(a, b, &q, &r);
   printf("Quotient is: %d
Remainder is: %d
", q, r);
}
Comment

PREVIOUS NEXT
Code Example
C :: escaping characters in hibernate queries 
C :: yt-project annotate_scale 
C :: String insertion into another string 
C :: search and then change string -- strstr and strcpy 
C :: unity read text file line by line 
C :: lazer codechef 
C :: C fgets() and puts() 
C :: convert integer to float in c 
C :: c static variable 
C :: arma 3 nearest terrain objects 
C :: Word Processor, Spreadsheet and Presentation Software are the examples of 
C :: array in c 
C :: c variable 
C :: Happy New Year! 
C :: robtex 
Dart :: flutter appbar backbutton remove 
Dart :: rounded raisedbutton in flutter 
Dart :: flutter check if string is number dart 
Dart :: flutter textfield outlineinputborder 
Dart :: flutter network image size 
Dart :: flutter chip avatar radius increases 
Dart :: how to add padding flutter 
Dart :: flutter checkbox color 
Dart :: dart string interpolation 
Dart :: how to put tapping effect on card in flutter 
Dart :: DartPad requires localStorage to be enabled 
Dart :: change password firebase flutter 
Dart :: dart remainder 
Dart :: flutter container 
Dart :: dart private method 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =