c ternary operator
snippet in c

ternary operator

user6892

 if ($scope.SearchSalesOrderAndCompanyName !== undefined && $scope.SearchSalesOrderAndCompanyName != null ) {
            SearchCriteria += " AND [SalesOrderNo] LIKE '%" + $scope.SearchSalesOrderAndCompanyName + "%' OR ([SO].[CompanyNameOnBill] LIKE '%" + $scope.SearchSalesOrderAndCompanyName + "%')";
        }
        if ($scope.FromDate !== undefined && $scope.FromDate !=null) {
            SearchCriteria += " AND [SO].[SalesOrderDate] LIKE '%" + $scope.FromDate + "%'";
        }
      

how to use ternary operator in c programming

user5576

int a = 10, b = 20, c;

c = (a < b) ? a : b;

printf("%d", c);

c ternary operator

user3868

condition ? value_if_true : value_if_false