Datatypes Flashcards

1
Q

Types

A

String, real, Integer, Dt&T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

String

A

i =len(“swetha”); o/p= 6
b =atoi(s) o/p=15
b =aton(s) o/p= 7.2
ntoa(b, s) o/p= “5.6”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Consider string b as EEAAGGLLLEEE

A

a= Left(b,4); 0/p = EEAA
a= right(b,6); o/p = LLLEEE
a=trimleft(b,”e”); o/p = AAGGLLLEEE
b =trimright(b,”e”) o/p = EEAAGGLLL
a=trim(b,”e”) o/p = AAGGLLL
a=mid(b,5,8); o/p = GGLLLEEE
a=strstr(“littlelilly”,”li”); o/p = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Date

A

strdate(d,”%y/%m/%d”,s); o/p = format “year/month/day” - 22/6/21

d = date(“%y/%m/%d”,”95/4/6”); o/p will be as is

d=#originalelecode«weeks(2);
This removes 2 weeks to the date

d=#originalelecode»weeks(2);
This adds 2 weeks to the date

d=#originalelecode«seconds(5);
This removes 5 secs from time

d=#originalelecode»seconds(5);
This adds 5 secs to time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly