TCS NQT Question Solve | 12 Sep | Slot 2 (IV) | Codewindow.in

Programming Logic

Integer digit = 0;
if digit
print “1”
else
print “digit”
end if
#include 
void f(int*p, int*m)
{*m=*m+3;
*p=*p+*m;
return;
}
int main ()
{
int k=0;
f(&i,&j);
k=(i*j);
printf(“%d”, k);
return 0;
}
#include 
Void main ()
{
    Int rate = 15, piece = 10, interim, result = 0;
    interim = rate % piece;
    result + = interim / 5
    printf(“%d, result);
}
using namespace std;
int main()
{
    int a = 3, b = 5;
    while(b--)
    a++;
    cout << a;
    return 0;
}
#include 
using namespace std;
int main ()
{
    Int sides = 3;
    Int lines = 3;
    If (!(sides^lines)}
        cout<< “Triangle”;
    else
        cout<<”Others”;
    return 0;
}
#include 
using namespace std;
int main ()
{
    Int skip_num;
    for (skip_num = 1; skip_num<=5; skip_num++){
        if(skip_num = =2 || skip_num = =4){
            continue;
        }
    cout<<skip_num;
    cout<<’’
    }
    return 0;
    
}

Also Checkout

Recent Posts

Leave a Comment

Your email address will not be published. Required fields are marked *