SlideShare a Scribd company logo
Programming in C
Unit 5 : String, Math and Date
Time Functions
Shalu J. Rajawat
Strings
2
Strings
• A special kind of array is an array of characters ending in the
null character 0 called string arrays
• A string is declared as an array of characters
char s[10]
char p[30]
• When declaring a string don’t forget to leave a space for the
null character which is also known as the string terminator
character
3
"A String" A 0
g
n
i
r
t
S
Strings
4
String Literals
• String literal values are represented by sequences of
characters between double quotes (“)
• Examples
• “” - empty string
• “hello”
• “a” versus ‘a’
• ‘a’ is a single character value (stored in 1 byte) as the ASCII
value for a
• “a” is an array with two characters, the first is a, the second is
the character value 0
Strings
5
Duplicate String Literals
• Each string literal in a C program is stored at a different
location
• So even if the string literals contain the same string, they are
not equal (in the == sense)
• Example:
• char string1[6] = “hello”;
• char string2[6] = “hello”;
• but string1 does not equal string2 (they are stored at different
locations)
String Variables
6
• Allocate an array of a size large enough to hold the string (plus 1 extra
value for the delimiter)
• Examples (with initialization):
char str1[6] = “Hello”;
char str2[] = “Hello”;
char *str3 = “Hello”;
char str4[6] = {‘H’,’e’,’l’,’l’,’o’,’0’};
• Note, each variable is considered a constant in that the space it is
connected to cannot be changed
str1 = str2; /* not allowable, but we can copy the contents
of str2 to str1 (more later) */
String Input
• Use %s field specification in scanf to read string
• ignores leading white space
• reads characters until next white space encountered
• C stores null (0) char after last non-white space char
• Reads into array (no & before name, array is a pointer)
• Example:
char Name[11];
scanf(“%s”,Name);
• Problem: no limit on number of characters read (need one for
delimiter), if too many characters for array, problems may occur.
7
Operations on strings
8
• strcpy - copy one string into another
• strcat - append one string onto the right side of the other
• strcmp – compare alphabetic order of two strings
• strlen – return the length of a string
• Strrev-reverse the string
• Strupr- convert string to uppercase
• Strlwr- convert string to lowercase
Strcpy
9
• strcpy(destinationstring, sourcestring)
• Copies sourcestring into destinationstring
For example
strcpy(str, “hello world”); assigns “hello world” to the string str
Code:
#include <stdio.h>
#include <string.h>
main()
{
char x[] = “Example with strcpy”;
char y[25];
printf(“The string in array x is %s n “, x);
strcpy(y,x);
printf(“The string in array y is %s n “, y);
}
Strcat
10
 strcat(destinationstring, sourcestring)
 appends sourcestring to right hand side of destinationstring
For example if str had value “a big ”
strcat(str, “hello world”);
Appends “hello world” to the string “a big ” to get “ a big hello world”
Code:
#include <stdio.h>
#include <string.h>
main()
{
char x[] = “Example with strcat”;
char y[]= “which stands for string concatenation”;
printf(“The string in array x is %s n “, x);
strcat(x,y);
printf(“The string in array x is %s n “, x);
}
Mathematics Functions
11
Mathematics Functions
All C inbuilt functions which are declared in “math.h” header file supports all the
mathematical related functions in C language. All the arithmetic functions used in C
language are given below.
12
Function Description
floor ( )
This function returns the nearest integer which is less than or equal
to the argument passed to this function.
round ( )
This function returns the nearest integer value of the
float/double/long double argument passed to this function. If
decimal value is from “.1 to .5”, it returns integer value less than the
argument. If decimal value is from “.6 to .9”, it returns the integer
value greater than the argument.
ceil ( )
This function returns nearest integer value which is greater than or
equal to the argument passed to this function.
sin ( ) This function is used to calculate sine value.
Mathematics Functions
Function Description
cos ( ) This function is used to calculate cosine.
cosh ( ) This function is used to calculate hyperbolic cosine.
exp ( ) This function is used to calculate the exponential “e” to the xth power.
tan ( ) This function is used to calculate tangent.
tanh ( ) This function is used to calculate hyperbolic tangent.
sinh ( ) This function is used to calculate hyperbolic sine.
log ( ) This function is used to calculates natural logarithm.
log10 ( ) This function is used to calculates base 10 logarithm.
sqrt ( )
This function is used to find square root of the argument passed to
this function.
pow ( ) This is used to find the power of the given number.
trunc.(.)
This function truncates the decimal value from floating point value
and returns integer value.
13
Program for Mathematics Function
// C code to illustrate
// the use of math function
#include <stdio.h>
#include <math.h>
int main ()
{
double x = 0, val4 = -2.3, x=2.7, ret;
int b = -344, c =3;
printf("The exponential value of %lf is %lfn", x, exp(x));
printf("The exponential value of %lf is %lfn", x+1, exp(x+1));
printf("The exponential value of %lf is %lfn", x+2, exp(x+2));
printf ("value4 = %.1lfn", ceil(val4));
printf("Value4 = %.1lfn", floor(val4));
printf("The absolute value of %d is %lfn", b, fabs(b));
ret = log(x);
printf("log(%lf) = %lf", x, ret);
x = 10000;
/* finding value of log1010000 */
ret = log10(x);
printf("log10(%lf) = %lfn", x, ret);
printf("Remainder of %f / %d is %lfn", x, c, fmod(x, c));
return(0);
}
14
Date & Time Function
15
Date & Time Function
Date &Time functions in C are used to interact with system date & time routine and
formatted time outputs are displayed. Example programs for the date & time functions
are given below.
16
Date and Time Functions
Function Description
setdate() This function used to modify the system date
getdate() This function is used to get the CPU time
clock() This function is used to get current system time
time() This function is used to get current system time as structure
difftime() This function is used to get the difference between two given times
strftime() This function is used to modify the actual time format
mktime() This function interprets tm structure as calendar time
localtime()
This function shares the tm structure that contains date and time
informations
gmtime()
This function shares the tm structure that contains date and time
informations
ctime()
This function is used to return string that contains date and time
informations
asctime()
Tm structure contents are interpreted by this function as calendar time. This
time is converted into string.
17
setDate
#include<stdio.h>
#include<dos.h>
#include<conio.h>
int main()
{
struct date dt;
printf("Enter new date in the format(day month year)");
scanf("%d%d%d",&dt.da_day,&dt.da_mon,&dt.da_year);
setdate(&dt);
printf("Now, current system date is %d-%d-%dn” ,dt.da_day,dt.da_mon,dt.da_year);
return 0;
}
18
getDate()
#include<stdio.h>
#include<dos.h>
int main()
{
struct date dt;
getdate(&dt);
printf("Operating system's current date is %d-%d-%dn"
,dt.da_day,dt.da_mon,dt.da_year);
return 0;
}
19
Clock()
#include <stdio.h>
#include <time.h>
#include <math.h>
int main()
{
int i;
clock_t CPU_time_1 = clock();
printf("CPU start time is : %d n", CPU_time_1);
for(i = 0; i < 150000000; i++);
clock_t CPU_time_2 = clock();
printf("CPU end time is : %d", CPU_time_2);
}
20
Time() & Difftime()
#include <stdio.h>
#include <time.h>
int main ()
{
time_t seconds;
seconds = time (NULL);
printf ("Number of hours since 1970 Jan 1st "  "is %ld n", seconds/3600);
return 0;
}
#include <stdio.h>
#include <time.h>
int main()
{
time_t begin,end;
long i;
begin= time(NULL);
for(i = 0; i < 150000000; i++);
end = time(NULL);
printf("for loop used %f seconds to complete the "  "executionn", difftime(end, begin));
return 0;
}
21
Remaining Functions
#include <stdio.h>
#include <time.h>
#define LEN 150
int main ()
{
char buf[LEN];
time_t curtime;
struct tm *loc_time;
//Getting current time of system
curtime = time (NULL);
// Converting current time to local time
loc_time = localtime (&curtime);
// Displaying date and time in standard format
printf("%s", asctime (loc_time));
strftime (buf, LEN, "Today is %A, %b %d.n", loc_time);
fputs (buf, stdout);
strftime (buf, LEN, "Time is %I:%M %p.n", loc_time);
fputs (buf, stdout);
return 0;
}
22
Summary
• C is a general-purpose programming language.
• C is a high-level language that is easy to read, understand and maintain
• C programs can be reused.
• C needs a compiler to convert its programs into machine readable form
23

More Related Content

Similar to unit-5 String Math Date Time AI presentation (20)

PDF
Functions torage class and array and strings-
aneebkmct
 
PPTX
Mcai pic u 4 function, storage class and array and strings
Rai University
 
PPTX
function, storage class and array and strings
Rai University
 
PPTX
ARRAY's in C Programming Language PPTX.
MSridhar18
 
PPTX
C language
Priya698357
 
PPTX
Header file.pptx
ALANWALKERPIANO
 
PPTX
POEPPSGNHwkejnkweoewnkenjwjewkjewoewkjewijewjk
hanumanthumanideeph6
 
PDF
Character Array and String
Tasnima Hamid
 
PPTX
C Programming Unit-3
Vikram Nandini
 
PDF
C_Dayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 6.pdf
amanpathak160605
 
PPTX
C-Arrays & Strings (computer programming).pptx
yusuph2410
 
PPTX
CSE 1102 - Lecture_7 - Strings_in_C.pptx
Salim Shadman Ankur
 
PPTX
Handling of character strings C programming
Appili Vamsi Krishna
 
PDF
C programming part4
Keroles karam khalil
 
PDF
C programming part4
Keroles karam khalil
 
PDF
Strings part2
yndaravind
 
PDF
[ITP - Lecture 17] Strings in C/C++
Muhammad Hammad Waseem
 
PPTX
Week6_P_String.pptx
OluwafolakeOjo
 
PPTX
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_08-08-2022_C_...
AntareepMajumder
 
Functions torage class and array and strings-
aneebkmct
 
Mcai pic u 4 function, storage class and array and strings
Rai University
 
function, storage class and array and strings
Rai University
 
ARRAY's in C Programming Language PPTX.
MSridhar18
 
C language
Priya698357
 
Header file.pptx
ALANWALKERPIANO
 
POEPPSGNHwkejnkweoewnkenjwjewkjewoewkjewijewjk
hanumanthumanideeph6
 
Character Array and String
Tasnima Hamid
 
C Programming Unit-3
Vikram Nandini
 
C_Dayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy 6.pdf
amanpathak160605
 
C-Arrays & Strings (computer programming).pptx
yusuph2410
 
CSE 1102 - Lecture_7 - Strings_in_C.pptx
Salim Shadman Ankur
 
Handling of character strings C programming
Appili Vamsi Krishna
 
C programming part4
Keroles karam khalil
 
C programming part4
Keroles karam khalil
 
Strings part2
yndaravind
 
[ITP - Lecture 17] Strings in C/C++
Muhammad Hammad Waseem
 
Week6_P_String.pptx
OluwafolakeOjo
 
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_08-08-2022_C_...
AntareepMajumder
 

Recently uploaded (20)

PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Dimensions of Societal Planning in Commonism
StefanMz
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
QUARTER 1 WEEK 2 PLOT, POV AND CONFLICTS
KynaParas
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
Ad

unit-5 String Math Date Time AI presentation

  • 1. Programming in C Unit 5 : String, Math and Date Time Functions Shalu J. Rajawat
  • 3. Strings • A special kind of array is an array of characters ending in the null character 0 called string arrays • A string is declared as an array of characters char s[10] char p[30] • When declaring a string don’t forget to leave a space for the null character which is also known as the string terminator character 3 "A String" A 0 g n i r t S
  • 4. Strings 4 String Literals • String literal values are represented by sequences of characters between double quotes (“) • Examples • “” - empty string • “hello” • “a” versus ‘a’ • ‘a’ is a single character value (stored in 1 byte) as the ASCII value for a • “a” is an array with two characters, the first is a, the second is the character value 0
  • 5. Strings 5 Duplicate String Literals • Each string literal in a C program is stored at a different location • So even if the string literals contain the same string, they are not equal (in the == sense) • Example: • char string1[6] = “hello”; • char string2[6] = “hello”; • but string1 does not equal string2 (they are stored at different locations)
  • 6. String Variables 6 • Allocate an array of a size large enough to hold the string (plus 1 extra value for the delimiter) • Examples (with initialization): char str1[6] = “Hello”; char str2[] = “Hello”; char *str3 = “Hello”; char str4[6] = {‘H’,’e’,’l’,’l’,’o’,’0’}; • Note, each variable is considered a constant in that the space it is connected to cannot be changed str1 = str2; /* not allowable, but we can copy the contents of str2 to str1 (more later) */
  • 7. String Input • Use %s field specification in scanf to read string • ignores leading white space • reads characters until next white space encountered • C stores null (0) char after last non-white space char • Reads into array (no & before name, array is a pointer) • Example: char Name[11]; scanf(“%s”,Name); • Problem: no limit on number of characters read (need one for delimiter), if too many characters for array, problems may occur. 7
  • 8. Operations on strings 8 • strcpy - copy one string into another • strcat - append one string onto the right side of the other • strcmp – compare alphabetic order of two strings • strlen – return the length of a string • Strrev-reverse the string • Strupr- convert string to uppercase • Strlwr- convert string to lowercase
  • 9. Strcpy 9 • strcpy(destinationstring, sourcestring) • Copies sourcestring into destinationstring For example strcpy(str, “hello world”); assigns “hello world” to the string str Code: #include <stdio.h> #include <string.h> main() { char x[] = “Example with strcpy”; char y[25]; printf(“The string in array x is %s n “, x); strcpy(y,x); printf(“The string in array y is %s n “, y); }
  • 10. Strcat 10  strcat(destinationstring, sourcestring)  appends sourcestring to right hand side of destinationstring For example if str had value “a big ” strcat(str, “hello world”); Appends “hello world” to the string “a big ” to get “ a big hello world” Code: #include <stdio.h> #include <string.h> main() { char x[] = “Example with strcat”; char y[]= “which stands for string concatenation”; printf(“The string in array x is %s n “, x); strcat(x,y); printf(“The string in array x is %s n “, x); }
  • 12. Mathematics Functions All C inbuilt functions which are declared in “math.h” header file supports all the mathematical related functions in C language. All the arithmetic functions used in C language are given below. 12 Function Description floor ( ) This function returns the nearest integer which is less than or equal to the argument passed to this function. round ( ) This function returns the nearest integer value of the float/double/long double argument passed to this function. If decimal value is from “.1 to .5”, it returns integer value less than the argument. If decimal value is from “.6 to .9”, it returns the integer value greater than the argument. ceil ( ) This function returns nearest integer value which is greater than or equal to the argument passed to this function. sin ( ) This function is used to calculate sine value.
  • 13. Mathematics Functions Function Description cos ( ) This function is used to calculate cosine. cosh ( ) This function is used to calculate hyperbolic cosine. exp ( ) This function is used to calculate the exponential “e” to the xth power. tan ( ) This function is used to calculate tangent. tanh ( ) This function is used to calculate hyperbolic tangent. sinh ( ) This function is used to calculate hyperbolic sine. log ( ) This function is used to calculates natural logarithm. log10 ( ) This function is used to calculates base 10 logarithm. sqrt ( ) This function is used to find square root of the argument passed to this function. pow ( ) This is used to find the power of the given number. trunc.(.) This function truncates the decimal value from floating point value and returns integer value. 13
  • 14. Program for Mathematics Function // C code to illustrate // the use of math function #include <stdio.h> #include <math.h> int main () { double x = 0, val4 = -2.3, x=2.7, ret; int b = -344, c =3; printf("The exponential value of %lf is %lfn", x, exp(x)); printf("The exponential value of %lf is %lfn", x+1, exp(x+1)); printf("The exponential value of %lf is %lfn", x+2, exp(x+2)); printf ("value4 = %.1lfn", ceil(val4)); printf("Value4 = %.1lfn", floor(val4)); printf("The absolute value of %d is %lfn", b, fabs(b)); ret = log(x); printf("log(%lf) = %lf", x, ret); x = 10000; /* finding value of log1010000 */ ret = log10(x); printf("log10(%lf) = %lfn", x, ret); printf("Remainder of %f / %d is %lfn", x, c, fmod(x, c)); return(0); } 14
  • 15. Date & Time Function 15
  • 16. Date & Time Function Date &Time functions in C are used to interact with system date & time routine and formatted time outputs are displayed. Example programs for the date & time functions are given below. 16
  • 17. Date and Time Functions Function Description setdate() This function used to modify the system date getdate() This function is used to get the CPU time clock() This function is used to get current system time time() This function is used to get current system time as structure difftime() This function is used to get the difference between two given times strftime() This function is used to modify the actual time format mktime() This function interprets tm structure as calendar time localtime() This function shares the tm structure that contains date and time informations gmtime() This function shares the tm structure that contains date and time informations ctime() This function is used to return string that contains date and time informations asctime() Tm structure contents are interpreted by this function as calendar time. This time is converted into string. 17
  • 18. setDate #include<stdio.h> #include<dos.h> #include<conio.h> int main() { struct date dt; printf("Enter new date in the format(day month year)"); scanf("%d%d%d",&dt.da_day,&dt.da_mon,&dt.da_year); setdate(&dt); printf("Now, current system date is %d-%d-%dn” ,dt.da_day,dt.da_mon,dt.da_year); return 0; } 18
  • 19. getDate() #include<stdio.h> #include<dos.h> int main() { struct date dt; getdate(&dt); printf("Operating system's current date is %d-%d-%dn" ,dt.da_day,dt.da_mon,dt.da_year); return 0; } 19
  • 20. Clock() #include <stdio.h> #include <time.h> #include <math.h> int main() { int i; clock_t CPU_time_1 = clock(); printf("CPU start time is : %d n", CPU_time_1); for(i = 0; i < 150000000; i++); clock_t CPU_time_2 = clock(); printf("CPU end time is : %d", CPU_time_2); } 20
  • 21. Time() & Difftime() #include <stdio.h> #include <time.h> int main () { time_t seconds; seconds = time (NULL); printf ("Number of hours since 1970 Jan 1st " "is %ld n", seconds/3600); return 0; } #include <stdio.h> #include <time.h> int main() { time_t begin,end; long i; begin= time(NULL); for(i = 0; i < 150000000; i++); end = time(NULL); printf("for loop used %f seconds to complete the " "executionn", difftime(end, begin)); return 0; } 21
  • 22. Remaining Functions #include <stdio.h> #include <time.h> #define LEN 150 int main () { char buf[LEN]; time_t curtime; struct tm *loc_time; //Getting current time of system curtime = time (NULL); // Converting current time to local time loc_time = localtime (&curtime); // Displaying date and time in standard format printf("%s", asctime (loc_time)); strftime (buf, LEN, "Today is %A, %b %d.n", loc_time); fputs (buf, stdout); strftime (buf, LEN, "Time is %I:%M %p.n", loc_time); fputs (buf, stdout); return 0; } 22
  • 23. Summary • C is a general-purpose programming language. • C is a high-level language that is easy to read, understand and maintain • C programs can be reused. • C needs a compiler to convert its programs into machine readable form 23

Editor's Notes

  • #4: A function is a self contained block of statements that perform a specific task. Functions are also called sub programs.   Dividing a program into functions is one of the major principles of top-down structured programming. By using functions it is possible to reduce the size of a program by calling & using them at different places in a program. Thus a complex problem may be decomposed into smaller, easily manageable parts or modules called functions.   The main advantages of using are:- Easy to write a correct & small function. Easy to read, write & debug a function. Easier to maintain or modify such a function. Small functions tend to be self documenting & highly readable. It can be called any number of times in any place with different parameters.
  • #5: A function is a self contained block of statements that perform a specific task. Functions are also called sub programs.   Dividing a program into functions is one of the major principles of top-down structured programming. By using functions it is possible to reduce the size of a program by calling & using them at different places in a program. Thus a complex problem may be decomposed into smaller, easily manageable parts or modules called functions.   The main advantages of using are:- Easy to write a correct & small function. Easy to read, write & debug a function. Easier to maintain or modify such a function. Small functions tend to be self documenting & highly readable. It can be called any number of times in any place with different parameters.
  • #6: A function is a self contained block of statements that perform a specific task. Functions are also called sub programs.   Dividing a program into functions is one of the major principles of top-down structured programming. By using functions it is possible to reduce the size of a program by calling & using them at different places in a program. Thus a complex problem may be decomposed into smaller, easily manageable parts or modules called functions.   The main advantages of using are:- Easy to write a correct & small function. Easy to read, write & debug a function. Easier to maintain or modify such a function. Small functions tend to be self documenting & highly readable. It can be called any number of times in any place with different parameters.